Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 5ec3e75

Browse files
committed
ref(e2e): move k8s version test config to CI
This change removes the tests defined in e2e_k8s_version_test.go and instead configures CI to run an existing test with different kind clusters running specific versions of Kubernetes. The versions tested have been changed from v1.21.11 to v1.21.10 and from v1.22.8 to v1.22.7 because kind has never published node images for the versions previously defined. Fixes #4659 Signed-off-by: Jon Huhn <[email protected]>
1 parent f73b9af commit 5ec3e75

File tree

2 files changed

+19
-124
lines changed

2 files changed

+19
-124
lines changed

.github/workflows/main.yml

+19-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,16 @@ jobs:
202202
needs: build
203203
strategy:
204204
matrix:
205+
k8s_version: [""]
206+
focus: [""]
205207
bucket: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
208+
include:
209+
- k8s_version: v1.21.10
210+
focus: "Test traffic flowing from client to server with a Kubernetes Service for the Source: HTTP"
211+
bucket: ".*"
212+
- k8s_version: v1.22.7
213+
focus: "Test traffic flowing from client to server with a Kubernetes Service for the Source: HTTP"
214+
bucket: ".*"
206215
env:
207216
CTR_TAG: ${{ github.sha }}
208217
CTR_REGISTRY: "localhost:5000" # unused for kind, but currently required in framework
@@ -233,13 +242,21 @@ jobs:
233242
id: test
234243
env:
235244
K8S_NAMESPACE: "osm-system"
236-
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\]'
245+
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
237246
continue-on-error: true
247+
- name: Set Logs name
248+
if: ${{ steps.test.conclusion != 'skipped' }}
249+
run: |
250+
if [[ -n "${{ matrix.k8s_version }}" ]]; then
251+
echo "ARTIFACT_NAME=test_logs_k8s_version_${{ matrix.k8s_version }}" >> $GITHUB_ENV
252+
else
253+
echo "ARTIFACT_NAME=test_logs_bucket_${{ matrix.bucket }}" >> $GITHUB_ENV
254+
fi
238255
- name: Upload test logs
239256
if: ${{ steps.test.conclusion != 'skipped' }}
240257
uses: actions/upload-artifact@v2
241258
with:
242-
name: test_logs_bucket_${{ matrix.bucket }}
259+
name: ${{ env.ARTIFACT_NAME }}
243260
path: /tmp/test**/*
244261
- name: Check continue tests
245262
if: ${{ steps.test.conclusion != 'skipped' && steps.test.outcome == 'failure'}}

tests/e2e/e2e_k8s_version_test.go

-122
This file was deleted.

0 commit comments

Comments
 (0)