diff --git a/fixtures/https_redirect/with_env/manifest.yml b/fixtures/https_redirect/with_env/manifest.yml deleted file mode 100644 index 663012a4d..000000000 --- a/fixtures/https_redirect/with_env/manifest.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -env: - FORCE_HTTPS: true diff --git a/src/staticfile/integration/default_test.go b/src/staticfile/integration/default_test.go index 7c84a7a8c..809e2c905 100644 --- a/src/staticfile/integration/default_test.go +++ b/src/staticfile/integration/default_test.go @@ -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()) } }) @@ -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()) + } }) })