Skip to content

Commit

Permalink
test: fix e2e test flakes
Browse files Browse the repository at this point in the history
Signed-off-by: Russell Centanni <[email protected]>
  • Loading branch information
lizardruss committed Dec 1, 2023
1 parent 79fa51d commit 2fb4169
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- "**.go"
- "!**_test.go" # exclude test files to ignore unit test changes
- "e2e/**_test.go" # include test files in e2e again
- "e2e/**.yaml" # include test files in e2e again
- ".github/workflows/e2e-tests.yaml"

env:
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/ssh/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import "github.com/onsi/ginkgo/v2"

// DevSpaceDescribe annotates the test with the label.
func DevSpaceDescribe(text string, body func()) bool {
return ginkgo.Describe("[ssh] "+text, body)
return ginkgo.FDescribe("[ssh] "+text, body)
}
6 changes: 3 additions & 3 deletions e2e/tests/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var _ = DevSpaceDescribe("ssh", func() {
framework.ExpectNoError(err)
})

ginkgo.It("devspace dev should start an SSH service", func(ctx context.Context) {
ginkgo.It("devspace dev should start an SSH service", func() {
tempDir, err := framework.CopyToTempDir("tests/ssh/testdata/ssh-simple")
framework.ExpectNoError(err)
ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir)
Expand Down Expand Up @@ -79,7 +79,7 @@ var _ = DevSpaceDescribe("ssh", func() {
framework.ExpectNoError(err)
})

ginkgo.It("devspace dev should NOT start an SSH service when disabled with a variable", func(ctx context.Context) {
ginkgo.It("devspace dev should NOT start an SSH service when disabled with a variable", func() {
tempDir, err := framework.CopyToTempDir("tests/ssh/testdata/ssh-variable")
framework.ExpectNoError(err)
ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir)
Expand Down Expand Up @@ -132,7 +132,7 @@ var _ = DevSpaceDescribe("ssh", func() {
framework.ExpectNoError(cmdErr)
})

ginkgo.It("devspace dev should start an SSH service when enabled with a variable", func(ctx context.Context) {
ginkgo.It("devspace dev should start an SSH service when enabled with a variable", func() {
tempDir, err := framework.CopyToTempDir("tests/ssh/testdata/ssh-variable")
framework.ExpectNoError(err)
ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir)
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests/ssh/testdata/ssh-simple/devspace.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: v2beta1
name: ssh-simple
vars:
IMAGE: alpine
IMAGE: busybox
deployments:
test:
ssh-simple:
helm:
chart:
name: component-chart
Expand All @@ -14,7 +14,7 @@ deployments:
command: ["sleep"]
args: ["999999999999"]
dev:
test:
ssh-simple:
imageSelector: ${IMAGE}
ssh:
enabled: true
Expand Down
7 changes: 4 additions & 3 deletions e2e/tests/ssh/testdata/ssh-variable/devspace.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
version: v2beta1
name: ssh-variable
vars:
IMAGE: alpine
IMAGE: busybox
SSH:
value: true
deployments:
test:
ssh-variable:
helm:
displayOutput: true
chart:
name: component-chart
repo: https://charts.devspace.sh
Expand All @@ -16,7 +17,7 @@ deployments:
command: ["sleep"]
args: ["999999999999"]
dev:
test:
ssh-variable:
imageSelector: ${IMAGE}
ssh:
enabled: ${SSH}
Expand Down

0 comments on commit 2fb4169

Please sign in to comment.