Skip to content
3 changes: 0 additions & 3 deletions fixtures/https_redirect/with_env/manifest.yml

This file was deleted.

24 changes: 13 additions & 11 deletions src/staticfile/integration/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
t.Logf("❌ FAILED TEST - App/Container: %s", name)
t.Logf(" Platform: %s", settings.Platform)
}
if name != "" && (!settings.KeepFailedContainers || !t.Failed()) {
if name != "" && !t.Skipped() && (!settings.KeepFailedContainers || !t.Failed()) {
Expect(platform.Delete.Execute(name)).To(Succeed())
}
})
Expand Down Expand Up @@ -90,16 +90,18 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T

Expect(contents).To(ContainSubstring("404 Not Found"), string(contents))

cmd := exec.Command("docker", "container", "logs", deployment.Name)

output, err := cmd.CombinedOutput()
Expect(err).NotTo(HaveOccurred())

Expect(string(output)).To(ContainSubstring("GET / HTTP/1.1"))
Expect(string(output)).To(ContainSubstring("GET /does-not-exist HTTP/1.1"))

cmd = exec.Command("docker", "container", "exec", deployment.Name, "stat", "app/nginx/logs/access.log", "app/nginx/logs/error.log")
Expect(cmd.Run()).To(Succeed())
Eventually(func() string {
logs, _ := deployment.RuntimeLogs()
return logs
}, "10s", "1s").Should(Or(
ContainSubstring("GET / HTTP/1.1"),
ContainSubstring("GET /does-not-exist HTTP/1.1"),
))

if settings.Platform == "docker" {
cmd := exec.Command("docker", "container", "exec", deployment.Name, "stat", "app/nginx/logs/access.log", "app/nginx/logs/error.log")
Expect(cmd.Run()).To(Succeed())
}
})
})

Expand Down
Loading