Convert legacy docker tests from bash to golang (#11357)

* Convert the following Docker test from Bash to Go
    - basics
    - bootstraptoken
    - cacerts
    - compat -> skew
    - etcd
    - lazypull
    - upgrade

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add Docker go tests to GHA
* Prebuild K3s Go Tests
* Strip go test binaries to reduce size
* Handle complex branch options

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Implement basic golang tests on arm and arm64 pipelines

Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
Derek Nola
2024-11-26 12:30:52 -08:00
committed by GitHub
parent 1b7dd765a5
commit b5e2fa77a6
13 changed files with 1430 additions and 1 deletions

View File

@@ -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 $?"