Browse Source

Add e2e test to verify `docker compose down` works even when env file is missing

Signed-off-by: Max Proske <[email protected]>
Max Proske 3 months ago
parent
commit
60681a824c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      pkg/e2e/env_file_test.go

+ 5 - 0
pkg/e2e/env_file_test.go

@@ -37,6 +37,11 @@ func TestUnusedMissingEnvFile(t *testing.T) {
 	defer c.cleanupWithDown(t, "unused_dotenv")
 
 	c.RunDockerComposeCmd(t, "-f", "./fixtures/env_file/compose.yaml", "up", "-d", "serviceA")
+
+	// Runtime operations should work even with missing env file
+	c.RunDockerComposeCmd(t, "-f", "./fixtures/env_file/compose.yaml", "ps")
+	c.RunDockerComposeCmd(t, "-f", "./fixtures/env_file/compose.yaml", "logs")
+	c.RunDockerComposeCmd(t, "-f", "./fixtures/env_file/compose.yaml", "down")
 }
 
 func TestRunEnvFile(t *testing.T) {