mirror of https://github.com/docker/compose.git
Fix compose volume creation and check this in volume e2e test
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
fe363fd146
commit
d0728d94f2
|
@ -95,12 +95,14 @@ func TestLocalComposeVolume(t *testing.T) {
|
|||
|
||||
t.Run("up with build and no image name, volume", func(t *testing.T) {
|
||||
//ensure local test run does not reuse previously build image
|
||||
c.RunDockerOrExitError("--context", "default", "rmi", "compose-e2e-volume_nginx")
|
||||
c.RunDockerOrExitError("rmi", "compose-e2e-volume_nginx")
|
||||
c.RunDockerOrExitError("volume", "rm", projectName+"_staticVol")
|
||||
c.RunDockerCmd("compose", "up", "-d", "--workdir", "volume-test", "--project-name", projectName)
|
||||
|
||||
output := HTTPGetWithRetry(t, "http://localhost:8090", http.StatusOK, 2*time.Second, 20*time.Second)
|
||||
assert.Assert(t, strings.Contains(output, "Hello from Nginx container"))
|
||||
|
||||
_ = c.RunDockerCmd("compose", "down", "--project-name", projectName)
|
||||
_ = c.RunDockerCmd("volume", "rm", projectName+"_staticVol")
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue