1616
1717cd $( dirname $0 ) /..
1818
19+ git config --global --add safe.directory /tmpfs/src/github/cloud-profiler-nodejs
20+
1921SERVICE_KEY=" ${KOKORO_KEYSTORE_DIR} /72935_cloud-profiler-e2e-service-account-key"
2022COMMIT=$( git rev-parse HEAD)
2123BRANCH=$( git rev-parse --abbrev-ref HEAD)
@@ -27,22 +29,26 @@ export GOOGLE_APPLICATION_CREDENTIALS="${SERVICE_KEY}"
2729# Run test.
2830cd " system-test"
2931
32+ go version
33+
3034# Ensure a newer version of Go is used so it is compatible with newer libraries.
3135# Here we install v1.17.7 which is the current version as of when this code
3236# was written, following instructions from https://go.dev/doc/manage-install.
33- # Go modules might not be on for previous versions of Go, so we also have to
37+ # Go modules might not be on for previous versions of Go, so we also have to
3438# enable the module system explicitly.
35- export GO111MODULE=on
36- go install golang.org/dl/go1.17.7
37- go1.17.7 download
39+ retry sudo apt-get install -y wget
40+
41+ wget https://go.dev/dl/go1.17.7.linux-amd64.tar.gz
42+ sudo rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.7.linux-amd64.tar.gz
43+ export PATH=$PATH :/usr/local/go/bin
3844
3945# Initializing go modules allows our dependencies to install versions of their
4046# dependencies specified by their go.mod files. This reduces the likelihood of
4147# dependencies breaking this test.
42- go1.17.7 version
43- go1.17.7 mod init e2e
44- retry go1.17.7 get cloud.google.com/go/profiler/proftest@HEAD
45- retry go1.17.7 test -c -tags=integration .
48+ go version
49+ go mod init e2e
50+ retry go get cloud.google.com/go/profiler/proftest@HEAD
51+ retry go test -c -tags=integration .
4652
4753if [ " $KOKORO_GITHUB_PULL_REQUEST_NUMBER " = " " ]; then
4854 ./e2e.test -commit=" $COMMIT " -branch=" $BRANCH " -repo=" $REPO " -run_backoff_test=true
0 commit comments