mirror of https://github.com/docker/compose.git
e2e test to prevent future regression
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
038c81f34e
commit
c01c9c29f4
|
@ -0,0 +1,5 @@
|
|||
services:
|
||||
app:
|
||||
image: alpine
|
||||
volumes:
|
||||
- .:/my_vol
|
|
@ -161,3 +161,16 @@ func TestUpRecreateVolumes(t *testing.T) {
|
|||
res = c.RunDockerCmd(t, "volume", "inspect", fmt.Sprintf("%s_my_vol", projectName), "-f", "{{ index .Labels \"foo\" }}")
|
||||
res.Assert(t, icmd.Expected{Out: "zot"})
|
||||
}
|
||||
|
||||
func TestUpRecreateVolumes_IgnoreBinds(t *testing.T) {
|
||||
c := NewCLI(t)
|
||||
const projectName = "compose-e2e-recreate-volumes"
|
||||
t.Cleanup(func() {
|
||||
c.cleanupWithDown(t, projectName)
|
||||
})
|
||||
|
||||
c.RunDockerComposeCmd(t, "-f", "./fixtures/recreate-volumes/bind.yaml", "--project-name", projectName, "up", "-d")
|
||||
|
||||
res := c.RunDockerComposeCmd(t, "-f", "./fixtures/recreate-volumes/bind.yaml", "--project-name", projectName, "up", "-d")
|
||||
assert.Check(t, !strings.Contains(res.Combined(), "Recreated"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue