From 66340b3fabf2a06ded105a1b40a37aba7d423a07 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Fri, 22 Nov 2024 12:14:30 -0800 Subject: [PATCH] Implement basic golang tests on arm and arm64 pipelines Signed-off-by: Derek Nola --- scripts/test | 4 ++++ tests/docker/test-helpers.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index 42d64a1330ae..c1a2ed22ffba 100755 --- a/scripts/test +++ b/scripts/test @@ -23,6 +23,10 @@ docker ps # Only run basic tests on non amd64 archs, we use GitHub Actions for amd64 if [ "$ARCH" != 'amd64' ]; then + export K3S_IMAGE="rancher/k3s:${VERSION_TAG}${SUFFIX}" + go test ./tests/docker/basics/basics_test.go -k3sImage="$K3S_IMAGE" + echo "Did go test basics $?" + . ./tests/docker/test-run-basics echo "Did test-run-basics $?" diff --git a/tests/docker/test-helpers.go b/tests/docker/test-helpers.go index 59855020bf3d..b52739572f67 100644 --- a/tests/docker/test-helpers.go +++ b/tests/docker/test-helpers.go @@ -69,7 +69,7 @@ func NewTestConfig(k3sImage string) (*TestConfig, error) { } // Generate random secret - config.Secret = fmt.Sprintf("%012d", rand.Intn(1000000000000)) + config.Secret = fmt.Sprintf("%012d", rand.Int63n(1000000000000)) return config, nil }