From 43239648596de678a1d87b014a536fd46d3d4e41 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Mon, 15 Jul 2024 10:45:29 -0700 Subject: [PATCH] [Release-1.30] July Test Backports (#10507) * Move test-compat to GHA (#10414) Signed-off-by: Derek Nola * For E2E upgrade test, automatically determine the channel to use (#10461) Signed-off-by: Derek Nola --- .drone.yml | 8 +++++++- .github/workflows/e2e.yaml | 5 ++++- scripts/test | 6 ++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3df370d44c7e..3e75e0201947 100644 --- a/.drone.yml +++ b/.drone.yml @@ -639,7 +639,13 @@ steps: if [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then cd ../upgradecluster vagrant destroy -f - go test -v -timeout=45m ./upgradecluster_test.go -ci -local + # Convert release-1.XX branch to v1.XX channel + if [ "$DRONE_BRANCH" = "master" ]; then + UPGRADE_CHANNEL="latest" + else + UPGRADE_CHANNEL=$(echo $DRONE_BRANCH | sed 's/release-/v/') + fi + E2E_RELEASE_CHANNEL=$UPGRADE_CHANNEL go test -v -timeout=45m ./upgradecluster_test.go -ci -local cp ./coverage.out /tmp/artifacts/upgrade-coverage.out fi - docker stop registry && docker rm registry diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 65f7a61e2755..80f4af12cc8a 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -7,6 +7,7 @@ on: - "install.sh" - "tests/**" - "!tests/e2e**" + - "!tests/docker**" - ".github/**" - "!.github/workflows/e2e.yaml" pull_request: @@ -16,6 +17,7 @@ on: - "install.sh" - "tests/**" - "!tests/e2e**" + - "!tests/docker**" - ".github/**" - "!.github/workflows/e2e.yaml" workflow_dispatch: {} @@ -97,7 +99,7 @@ jobs: strategy: fail-fast: false matrix: - dtest: [basics, bootstraptoken, cacerts, lazypull, upgrade] + dtest: [basics, bootstraptoken, cacerts, compat, lazypull, upgrade] steps: - name: Checkout uses: actions/checkout@v4 @@ -113,6 +115,7 @@ jobs: - name: Run ${{ matrix.dtest }} Test run: | chmod +x ./dist/artifacts/k3s + . ./scripts/version.sh . ./tests/docker/test-helpers . ./tests/docker/test-run-${{ matrix.dtest }} echo "Did test-run-${{ matrix.dtest }} pass $?" diff --git a/scripts/test b/scripts/test index 684e1398003e..42d64a1330ae 100755 --- a/scripts/test +++ b/scripts/test @@ -29,6 +29,9 @@ if [ "$ARCH" != 'amd64' ]; then . ./tests/docker/test-run-cacerts echo "Did test-run-cacerts $?" + . ./tests/docker/test-run-compat + echo "Did test-run-compat $?" + . ./tests/docker/test-run-bootstraptoken echo "Did test-run-bootstraptoken $?" @@ -39,8 +42,7 @@ if [ "$ARCH" != 'amd64' ]; then echo "Did test-run-lazypull $?" fi -. ./tests/docker/test-run-compat -echo "Did test-run-compat $?" + . ./tests/docker/test-run-hardened echo "Did test-run-hardened $?"