diff --git a/local/e2e/compose_test.go b/local/e2e/compose_test.go index f17c8e3d1..0a161deac 100644 --- a/local/e2e/compose_test.go +++ b/local/e2e/compose_test.go @@ -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") }) }