From 551b2c3ceacb62cda1dbecc48dd641705b29a68f Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Thu, 8 Sep 2022 11:13:37 -0700 Subject: [PATCH] Cleanup init and run_test scripts Signed-off-by: Derek Nola --- tests/e2e/scripts/init.sh | 11 +++++++---- tests/e2e/scripts/run_tests.sh | 4 +--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/e2e/scripts/init.sh b/tests/e2e/scripts/init.sh index 683a487f66..21a31e5498 100755 --- a/tests/e2e/scripts/init.sh +++ b/tests/e2e/scripts/init.sh @@ -11,9 +11,11 @@ echo 'Installing jq' sudo apt-get -y install jq echo 'Installing Go' -curl -L https://dl.google.com/go/go1.16.10.linux-amd64.tar.gz | tar xz -sudo mv go /usr/local -/usr/local/go/bin/go version +GO_VERSION=1.19.1 +wget --quiet https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz +sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz +rm go$GO_VERSION.linux-amd64.tar.gz +echo go version echo 'Installing Virtualbox' @@ -29,7 +31,8 @@ echo 'Installing vagrant' sudo apt-get -y install -f unzip curl -O https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_linux_amd64.zip unzip vagrant_2.2.19_linux_amd64.zip -sudo cp vagrant /usr/local/bin/ +sudo mv vagrant /usr/local/bin/ +rm vagrant_2.2.19_linux_amd64.zip vagrant --version sudo apt-get -y install libarchive-tools vagrant plugin install vagrant-k3s diff --git a/tests/e2e/scripts/run_tests.sh b/tests/e2e/scripts/run_tests.sh index f5979a6b04..ae8ef4e924 100755 --- a/tests/e2e/scripts/run_tests.sh +++ b/tests/e2e/scripts/run_tests.sh @@ -12,9 +12,7 @@ eval openvpn --daemon --config external.ovpn &>/dev/null & sleep 10 ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s && git pull --rebase origin master' -ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 '/usr/local/go/bin/go get github.com/onsi/ginkgo/v2' -ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 '/usr/local/go/bin/go get github.com/onsi/gomega' -ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 '/usr/local/go/bin/go get github.com/k3s-io/k3s/tests/e2e' +ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s && go mod tidy' echo 'RUNNING CLUSTER VALIDATION TEST' ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s/tests/e2e/validatecluster && vagrant destroy -f'