diff --git a/tests/integration/restricted/install-src.sh b/tests/integration/restricted/install-src.sh index 63cd95b31bba..f530f4113924 100755 --- a/tests/integration/restricted/install-src.sh +++ b/tests/integration/restricted/install-src.sh @@ -1,6 +1,6 @@ #!/bin/bash -target_src_version="3.35.1" +target_src_version="5.0.2" current_src_version=$(src version | grep -i current | sed 's/current version: //i') if [ "$current_src_version" != "$target_src_version" ]; then diff --git a/tests/integration/restricted/test.sh b/tests/integration/restricted/test.sh index 26d7b112450a..4e764869de33 100755 --- a/tests/integration/restricted/test.sh +++ b/tests/integration/restricted/test.sh @@ -102,7 +102,9 @@ CLEANUP="kill $!; $CLEANUP" sleep 2 # (initial delay in port-forward activating) curl --retry-connrefused --retry 2 --retry-delay 10 -m 30 http://localhost:30080 -/usr/local/bin/src -endpoint http://localhost:30080 version +/usr/local/bin/src version # run a validation script against it -/usr/local/bin/src -endpoint http://localhost:30080 validate -context github_token=$GH_TOKEN validate.json +# '2>&1' is work around bug where token is output to stderr instead of stdout. Will be patched in 5.0.3 of src-cli +ADMIN_TOKEN=$(/usr/local/bin/src admin create --url http://localhost:30080 --username e2e-test-user --email e2e@sourcegraph.com --password 123123123-e2e-test --with-token 2>&1) +SRC_ACCESS_TOKEN=$ADMIN_TOKEN SRC_GITHUB_TOKEN=$GH_TOKEN SRC_ENDPOINT=http://localhost:30080/ /usr/local/bin/src validate install validate.json diff --git a/tests/integration/restricted/validate.json b/tests/integration/restricted/validate.json index 8f141c50c5c4..144d4e3a8740 100644 --- a/tests/integration/restricted/validate.json +++ b/tests/integration/restricted/validate.json @@ -1,26 +1,22 @@ { - "firstAdmin": { - "email": "e2e@sourcegrah.com", - "username": "e2e-test-user", - "password": "123123123-e2e-test" - }, "externalService": { - "config": { - "url": "https://github.com", - "token": "{{ .github_token }}", - "orgs": [], - "repos": [ - "sourcegraph-testing/repo-ssh-keys-test" - ] - }, "kind": "GITHUB", "displayName": "footest", - "deleteWhenDone": true - }, - "waitRepoCloned": { - "repo": "github.com/sourcegraph-testing/repo-ssh-keys-test", - "maxTries": 10, - "sleepBetweenTriesSeconds": 10 + "deleteWhenDone": true, + "maxRetries": 10, + "retryTimeoutSeconds": 10, + "config": { + "gitHub": { + "url": "https://github.com", + "orgs": [], + "repos": [ + "sourcegraph-testing/repo-ssh-keys-test" + ] + } + } }, - "searchQuery": "repo:^github.com/sourcegraph-testing/repo-ssh-keys-test$ gallery-director-drone-vacant-blizzard" + + "searchQuery": [ + "repo:^github.com/sourcegraph-testing/repo-ssh-keys-test$ gallery-director-drone-vacant-blizzard" + ] }