|
@@ -95,12 +95,14 @@ func TestLocalComposeVolume(t *testing.T) {
|
|
|
|
|
|
|
|
t.Run("up with build and no image name, volume", func(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
|
|
//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)
|
|
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)
|
|
output := HTTPGetWithRetry(t, "http://localhost:8090", http.StatusOK, 2*time.Second, 20*time.Second)
|
|
|
assert.Assert(t, strings.Contains(output, "Hello from Nginx container"))
|
|
assert.Assert(t, strings.Contains(output, "Hello from Nginx container"))
|
|
|
|
|
|
|
|
_ = c.RunDockerCmd("compose", "down", "--project-name", projectName)
|
|
_ = c.RunDockerCmd("compose", "down", "--project-name", projectName)
|
|
|
|
|
+ _ = c.RunDockerCmd("volume", "rm", projectName+"_staticVol")
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|