Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
csi-driver
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
hetznercloud
csi-driver
Commits
1c2ec7ec
Unverified
Commit
1c2ec7ec
authored
Feb 21, 2023
by
Julian Tölle
Committed by
GitHub
Feb 21, 2023
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/test_e2e.yml
+3
-0
3 additions, 0 deletions
.github/workflows/test_e2e.yml
e2etests/e2e_test.go
+5
-2
5 additions, 2 deletions
e2etests/e2e_test.go
with
8 additions
and
2 deletions
.github/workflows/test_e2e.yml
+
3
−
0
View file @
1c2ec7ec
...
@@ -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 }}
...
...
This diff is collapsed.
Click to expand it.
e2etests/e2e_test.go
+
5
−
2
View file @
1c2ec7ec
...
@@ -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
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment