(t *testing.T)
| 143 | } |
| 144 | |
| 145 | func TestUpRecreateVolumes(t *testing.T) { |
| 146 | c := NewCLI(t) |
| 147 | const projectName = "compose-e2e-recreate-volumes" |
| 148 | t.Cleanup(func() { |
| 149 | c.cleanupWithDown(t, projectName) |
| 150 | }) |
| 151 | |
| 152 | c.RunDockerComposeCmd(t, "-f", "./fixtures/recreate-volumes/compose.yaml", "--project-name", projectName, "up", "-d") |
| 153 | |
| 154 | res := c.RunDockerCmd(t, "volume", "inspect", fmt.Sprintf("%s_my_vol", projectName), "-f", "{{ index .Labels \"foo\" }}") |
| 155 | res.Assert(t, icmd.Expected{Out: "bar"}) |
| 156 | |
| 157 | c.RunDockerComposeCmd(t, "-f", "./fixtures/recreate-volumes/compose2.yaml", "--project-name", projectName, "up", "-d", "-y") |
| 158 | res = c.RunDockerCmd(t, "volume", "inspect", fmt.Sprintf("%s_my_vol", projectName), "-f", "{{ index .Labels \"foo\" }}") |
| 159 | res.Assert(t, icmd.Expected{Out: "zot"}) |
| 160 | } |
| 161 | |
| 162 | func TestUpRecreateVolumes_IgnoreBinds(t *testing.T) { |
| 163 | c := NewCLI(t) |
nothing calls this directly
no test coverage detected