Skip to content
Snippets Groups Projects
Unverified Commit 1c2ec7ec authored by Julian Tölle's avatar Julian Tölle Committed by GitHub
Browse files

ci(e2e): improve behaviour in spite of flakiness (#386)

Related to #381
parent efdda914
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,9 @@ jobs: ...@@ -5,6 +5,9 @@ jobs:
test: test:
runs-on: self-hosted runs-on: self-hosted
strategy: strategy:
# The e2e tests are flaky and often one of the jobs fails. The default setting
# causes all other currently running jobs to abort and all need to be restarted.
fail-fast: false
matrix: matrix:
k8s: [ k8s-1.23.15, k8s-1.24.9, k8s-1.25.5, k8s-1.26.0 ] k8s: [ k8s-1.23.15, k8s-1.24.9, k8s-1.25.5, k8s-1.26.0 ]
name: k8s ${{ matrix.k8s }} name: k8s ${{ matrix.k8s }}
......
...@@ -24,8 +24,11 @@ func TestMain(m *testing.M) { ...@@ -24,8 +24,11 @@ func TestMain(m *testing.M) {
} }
func TestOfficialTestsuite(t *testing.T) { func TestOfficialTestsuite(t *testing.T) {
// The e2e tests are a bit flaky, and at the moment in ~1/3 of the runs a test fails, causing the whole pipeline to
// fail. As ,the e2e tests take 15-20 minutes each, this is quite annoying. By setting -flakeAttempts=2, the pipeline
// will immediately retry any failed tests.
t.Run("parallel tests", func(t *testing.T) { t.Run("parallel tests", func(t *testing.T) {
err := RunCommandVisibleOnServer(testCluster.setup.privKey, testCluster.setup.MainNode, "KUBECONFIG=/root/.kube/config ./ginkgo -nodes=6 -v -focus='External.Storage' -skip='\\[Feature:|\\[Disruptive\\]|\\[Serial\\]' ./e2e.test -- -storage.testdriver=test-driver.yml") err := RunCommandVisibleOnServer(testCluster.setup.privKey, testCluster.setup.MainNode, "KUBECONFIG=/root/.kube/config ./ginkgo -nodes=6 -flakeAttempts=2 -v -focus='External.Storage' -skip='\\[Feature:|\\[Disruptive\\]|\\[Serial\\]' ./e2e.test -- -storage.testdriver=test-driver.yml")
if err != nil { if err != nil {
t.Error(err) t.Error(err)
} }
...@@ -37,7 +40,7 @@ func TestOfficialTestsuite(t *testing.T) { ...@@ -37,7 +40,7 @@ func TestOfficialTestsuite(t *testing.T) {
// Volume Access Mode in Kubernetes). // Volume Access Mode in Kubernetes).
// This feature is being tracked in https://github.com/hetznercloud/csi-driver/issues/327 // This feature is being tracked in https://github.com/hetznercloud/csi-driver/issues/327
// and we should add the tests once we have implemented the capability. // and we should add the tests once we have implemented the capability.
err := RunCommandVisibleOnServer(testCluster.setup.privKey, testCluster.setup.MainNode, "KUBECONFIG=/root/.kube/config ./ginkgo -v -focus='External.Storage.*(\\[Feature:|\\[Serial\\])' -skip='\\[Feature:SELinuxMountReadWriteOncePod\\]' ./e2e.test -- -storage.testdriver=test-driver.yml") err := RunCommandVisibleOnServer(testCluster.setup.privKey, testCluster.setup.MainNode, "KUBECONFIG=/root/.kube/config ./ginkgo -flakeAttempts=2 -v -focus='External.Storage.*(\\[Feature:|\\[Serial\\])' -skip='\\[Feature:SELinuxMountReadWriteOncePod\\]' ./e2e.test -- -storage.testdriver=test-driver.yml")
if err != nil { if err != nil {
t.Error(err) t.Error(err)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment