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

Commit 9f56fc9

Browse files
authored
Merge pull request #1258 from docker/red-e2e_compose_flags
Adapt e2e tests to compose flag order
2 parents a5b148b + a5affa4 commit 9f56fc9

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

aci/e2e/e2e-aci_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -557,15 +557,15 @@ func TestUpSecretsResources(t *testing.T) {
557557
_, _, _ = setupTestResourceGroup(t, c)
558558

559559
t.Run("compose up", func(t *testing.T) {
560-
c.RunDockerCmd("compose", "up", "-f", composefilePath, "--project-name", composeProjectName)
560+
c.RunDockerCmd("compose", "-f", composefilePath, "--project-name", composeProjectName, "up")
561561
res := c.RunDockerCmd("ps")
562562
out := Lines(res.Stdout())
563563
// Check 2 containers running
564564
assert.Assert(t, is.Len(out, 3))
565565
})
566566

567567
t.Cleanup(func() {
568-
c.RunDockerCmd("compose", "down", "--project-name", composeProjectName)
568+
c.RunDockerCmd("compose", "--project-name", composeProjectName, "down")
569569
res := c.RunDockerCmd("ps")
570570
out := Lines(res.Stdout())
571571
assert.Equal(t, len(out), 1)
@@ -696,7 +696,7 @@ func TestUpUpdate(t *testing.T) {
696696
Location: location,
697697
ResourceGroup: groupID,
698698
}
699-
c.RunDockerCmd("compose", "up", "-f", singlePortVolumesComposefile, "--domainname", dnsLabelName, "--project-name", projectName)
699+
c.RunDockerCmd("compose", "-f", singlePortVolumesComposefile, "--project-name", projectName, "up", "--domainname", dnsLabelName)
700700

701701
// Volume should be autocreated by the "compose up"
702702
uploadTestFile(t, aciContext, composeAccountName, fileshareName, testFileName, testFileContent)
@@ -747,11 +747,11 @@ func TestUpUpdate(t *testing.T) {
747747
})
748748

749749
t.Run("compose ps", func(t *testing.T) {
750-
res := c.RunDockerCmd("compose", "ps", "--project-name", composeProjectName, "--quiet")
750+
res := c.RunDockerCmd("compose", "--project-name", composeProjectName, "ps", "--quiet")
751751
l := Lines(res.Stdout())
752752
assert.Assert(t, is.Len(l, 3))
753753

754-
res = c.RunDockerCmd("compose", "ps", "--project-name", composeProjectName)
754+
res = c.RunDockerCmd("compose", "--project-name", composeProjectName, "ps")
755755
l = Lines(res.Stdout())
756756
assert.Assert(t, is.Len(l, 4))
757757
var wordsDisplayed, webDisplayed, dbDisplayed bool
@@ -797,7 +797,7 @@ func TestUpUpdate(t *testing.T) {
797797
})
798798

799799
t.Run("update", func(t *testing.T) {
800-
c.RunDockerCmd("compose", "up", "-f", multiPortComposefile, "--project-name", composeProjectName)
800+
c.RunDockerCmd("compose", "-f", multiPortComposefile, "--project-name", composeProjectName, "up")
801801
res := c.RunDockerCmd("ps")
802802
out := Lines(res.Stdout())
803803
// Check three containers are running
@@ -832,7 +832,7 @@ func TestUpUpdate(t *testing.T) {
832832
})
833833

834834
t.Run("down", func(t *testing.T) {
835-
c.RunDockerCmd("compose", "down", "--project-name", composeProjectName)
835+
c.RunDockerCmd("compose", "--project-name", composeProjectName, "down")
836836
res := c.RunDockerCmd("ps")
837837
out := Lines(res.Stdout())
838838
assert.Equal(t, len(out), 1)

cli/metrics/metrics_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func TestGetCommand(t *testing.T) {
130130
},
131131
{
132132
name: "compose up -f xxx",
133-
args: []string{"compose", "up", "-f", "titi.yaml"},
133+
args: []string{"compose", "-f", "up", "titi.yaml"},
134134
expected: "compose up",
135135
},
136136
{

ecs/e2e/ecs/e2e-ecs_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ func TestCompose(t *testing.T) {
8181
c, stack := setupTest(t)
8282

8383
t.Run("compose up", func(t *testing.T) {
84-
c.RunDockerCmd("compose", "up", "--project-name", stack, "-f", "./multi_port_secrets.yaml")
84+
c.RunDockerCmd("compose", "--project-name", stack, "-f", "./multi_port_secrets.yaml", "up")
8585
})
8686

8787
var webURL, wordsURL, secretsURL string
8888
t.Run("compose ps", func(t *testing.T) {
89-
res := c.RunDockerCmd("compose", "ps", "--project-name", stack)
89+
res := c.RunDockerCmd("compose", "--project-name", stack, "ps")
9090
lines := strings.Split(strings.TrimSpace(res.Stdout()), "\n")
9191

9292
assert.Equal(t, 5, len(lines))
@@ -152,7 +152,7 @@ func TestCompose(t *testing.T) {
152152
})
153153

154154
t.Run("compose down", func(t *testing.T) {
155-
cmd := c.NewDockerCmd("compose", "down", "--project-name", stack)
155+
cmd := c.NewDockerCmd("compose", "--project-name", stack, "down")
156156
res := icmd.StartCmd(cmd)
157157

158158
checkUp := func(t poll.LogT) poll.Result {

kube/e2e/compose_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func TestComposeUp(t *testing.T) {
8585
// db-698f4dd798-jd9gw db Running
8686
return fmt.Sprintf("%s-.*\\s+%s\\s+Pending\\s+", service, service)
8787
}
88-
res := c.RunDockerCmd("compose", "ps", "-p", projectName, "--all")
88+
res := c.RunDockerCmd("compose", "-p", projectName, "ps", "--all")
8989
testify.Regexp(t, getServiceRegx("db"), res.Stdout())
9090
testify.Regexp(t, getServiceRegx("words"), res.Stdout())
9191
testify.Regexp(t, getServiceRegx("web"), res.Stdout())
@@ -94,7 +94,7 @@ func TestComposeUp(t *testing.T) {
9494
})
9595

9696
t.Run("compose ps hides non running containers", func(t *testing.T) {
97-
res := c.RunDockerCmd("compose", "ps", "-p", projectName)
97+
res := c.RunDockerCmd("compose", "-p", projectName, "ps")
9898
assert.Equal(t, len(Lines(res.Stdout())), 1, res.Stdout())
9999
})
100100

0 commit comments

Comments
 (0)