Skip to content

Commit

Permalink
test(profiler): use go 1.18.4 in integration test (#6348)
Browse files Browse the repository at this point in the history
  • Loading branch information
amchiclet authored Jul 18, 2022
1 parent 458cd7c commit 761768b
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions profiler/kokoro/integration_test.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,28 @@ export GOOGLE_APPLICATION_CREDENTIALS="${KOKORO_KEYSTORE_DIR}/72935_cloud-profil
export GCLOUD_TESTS_GOLANG_PROJECT_ID="cloud-profiler-e2e"

# Ensure a newer version of Go is used so it is compatible with newer libraries.
# Here we install v1.17.7 which is the current version as of when this code
# was written, following instructions from https://go.dev/doc/manage-install.
# Go modules might not be on for previous versions of Go, so we also have to
# enable the module system explicitly.
export GO111MODULE=on
go install golang.org/dl/go1.17.7
go1.17.7 download
# Here we install v1.18.4 which is the current version as of July 2022.
mkdir -p /tmp/bin
GIMME=/tmp/bin/gimme
retry curl -sL -o "$GIMME" https://github.com/travis-ci/gimme/master/gimme
chmod +x "$GIMME"

export GIMME_GO_VERSION=1.18.4
export GIMME_ENV_PREFIX=/tmp/gimme_envs
install_go() {
"$GIMME"
# If gimme was successful, an .env script that sets up proper environment
# variables will be created.
if [[ -f "${GIMME_ENV_PREFIX}/go${GIMME_GO_VERSION}.env" ]]
then
source "${GIMME_ENV_PREFIX}/go${GIMME_GO_VERSION}.env"
else
return 1
fi
}
retry install_go

# Run test.
retry go1.17.7 mod download
go1.17.7 test -run TestAgentIntegration -run_only_profiler_backoff_test -timeout 1h
go version
retry go mod download
go test -run TestAgentIntegration -run_only_profiler_backoff_test -timeout 1h

0 comments on commit 761768b

Please sign in to comment.