Skip to content

Commit

Permalink
Implement basic golang tests on arm and arm64 pipelines
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola committed Nov 22, 2024
1 parent 50aeebc commit 66340b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -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 $?"

Expand Down
2 changes: 1 addition & 1 deletion tests/docker/test-helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 66340b3

Please sign in to comment.