Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Commit f32c1c8

Browse files
committed
fix: update go installation method
1 parent 3dd65e9 commit f32c1c8

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

system-test/integration_test.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ set -x
1616

1717
cd $(dirname $0)/..
1818

19+
git config --global --add safe.directory /tmpfs/src/github/cloud-profiler-nodejs
20+
1921
SERVICE_KEY="${KOKORO_KEYSTORE_DIR}/72935_cloud-profiler-e2e-service-account-key"
2022
COMMIT=$(git rev-parse HEAD)
2123
BRANCH=$(git rev-parse --abbrev-ref HEAD)
@@ -27,22 +29,26 @@ export GOOGLE_APPLICATION_CREDENTIALS="${SERVICE_KEY}"
2729
# Run test.
2830
cd "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

4753
if [ "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" = "" ]; then
4854
./e2e.test -commit="$COMMIT" -branch="$BRANCH" -repo="$REPO" -run_backoff_test=true

0 commit comments

Comments
 (0)