Skip to content

Commit 9b02add

Browse files
committed
fix race condition on start-stop e2e tests running in parrallel
Signed-off-by: Guillaume Lours <[email protected]>
1 parent a73a2c9 commit 9b02add

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/e2e/start_stop_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
func TestStartStop(t *testing.T) {
2929
c := NewParallelE2eCLI(t, binDir)
30-
const projectName = "e2e-start-stop"
30+
const projectName = "e2e-start-stop-no-dependencies"
3131

3232
getProjectRegx := func(status string) string {
3333
// match output with random spaces like:
@@ -43,7 +43,7 @@ func TestStartStop(t *testing.T) {
4343

4444
t.Run("Up a project", func(t *testing.T) {
4545
res := c.RunDockerComposeCmd("-f", "./fixtures/start-stop/compose.yaml", "--project-name", projectName, "up", "-d")
46-
assert.Assert(t, strings.Contains(res.Combined(), "Container e2e-start-stop-simple-1 Started"), res.Combined())
46+
assert.Assert(t, strings.Contains(res.Combined(), "Container e2e-start-stop-no-dependencies-simple-1 Started"), res.Combined())
4747

4848
res = c.RunDockerComposeCmd("ls", "--all")
4949
testify.Regexp(t, getProjectRegx("running"), res.Stdout())
@@ -57,13 +57,13 @@ func TestStartStop(t *testing.T) {
5757
c.RunDockerComposeCmd("-f", "./fixtures/start-stop/compose.yaml", "--project-name", projectName, "stop")
5858

5959
res := c.RunDockerComposeCmd("ls")
60-
assert.Assert(t, !strings.Contains(res.Combined(), "e2e-start-stop"), res.Combined())
60+
assert.Assert(t, !strings.Contains(res.Combined(), "e2e-start-stop-no-dependencies"), res.Combined())
6161

6262
res = c.RunDockerComposeCmd("ls", "--all")
6363
testify.Regexp(t, getProjectRegx("exited"), res.Stdout())
6464

6565
res = c.RunDockerComposeCmd("--project-name", projectName, "ps")
66-
assert.Assert(t, !strings.Contains(res.Combined(), "e2e-start-stop-words-1"), res.Combined())
66+
assert.Assert(t, !strings.Contains(res.Combined(), "e2e-start-stop-no-dependencies-words-1"), res.Combined())
6767

6868
res = c.RunDockerComposeCmd("--project-name", projectName, "ps", "--all")
6969
testify.Regexp(t, getServiceRegx("simple", "exited"), res.Stdout())

0 commit comments

Comments
 (0)