From 86820849925a3ed7fe60a28a2ad333311e51183d Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Mon, 12 Dec 2022 20:50:51 +0000 Subject: [PATCH] fix: update go installation method --- system-test/integration_test.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/system-test/integration_test.sh b/system-test/integration_test.sh index b935f5105..7fd8ad739 100755 --- a/system-test/integration_test.sh +++ b/system-test/integration_test.sh @@ -27,14 +27,23 @@ export GOOGLE_APPLICATION_CREDENTIALS="${SERVICE_KEY}" # Run test. cd "system-test" +go version + # 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 +# 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 +# export GO111MODULE=on +# go install golang.org/dl/go1.17.7 +# go1.17.7 download +retry sudo apt-get install -y wget + +wget https://go.dev/dl/go1.17.7.linux-amd64.tar.gz +sudo rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.7.linux-amd64.tar.gz +export PATH=$PATH:/usr/local/go/bin + +go version # Initializing go modules allows our dependencies to install versions of their # dependencies specified by their go.mod files. This reduces the likelihood of