mirror of
https://github.com/docker/compose.git
synced 2026-07-10 02:11:34 +00:00
introduce ability to select service to be stopped by compose down
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
68c462e607
commit
93bd27a0cc
6 changed files with 28 additions and 6 deletions
|
|
@ -102,6 +102,14 @@ func TestLocalComposeUp(t *testing.T) {
|
|||
res.Assert(t, icmd.Expected{Out: `compose-e2e-demo-words-1 gtardif/sentences-api latest`})
|
||||
})
|
||||
|
||||
t.Run("down SERVICE", func(t *testing.T) {
|
||||
_ = c.RunDockerComposeCmd(t, "--project-name", projectName, "down", "web")
|
||||
|
||||
res := c.RunDockerComposeCmd(t, "--project-name", projectName, "ps")
|
||||
assert.Assert(t, !strings.Contains(res.Combined(), "compose-e2e-demo-web-1"), res.Combined())
|
||||
assert.Assert(t, strings.Contains(res.Combined(), "compose-e2e-demo-db-1"), res.Combined())
|
||||
})
|
||||
|
||||
t.Run("down", func(t *testing.T) {
|
||||
_ = c.RunDockerComposeCmd(t, "--project-name", projectName, "down")
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue