Skip to content

Commit 9933f86

Browse files
authored
Merge pull request #487 from cloudfoundry/integration_tests
fix: Remove invalid HTTPS redirect test fixture
2 parents 8129163 + cf992cf commit 9933f86

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

fixtures/https_redirect/with_env/manifest.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/staticfile/integration/default_test.go

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
3636
t.Logf("❌ FAILED TEST - App/Container: %s", name)
3737
t.Logf(" Platform: %s", settings.Platform)
3838
}
39-
if name != "" && (!settings.KeepFailedContainers || !t.Failed()) {
39+
if name != "" && !t.Skipped() && (!settings.KeepFailedContainers || !t.Failed()) {
4040
Expect(platform.Delete.Execute(name)).To(Succeed())
4141
}
4242
})
@@ -90,16 +90,18 @@ func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T
9090

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

93-
cmd := exec.Command("docker", "container", "logs", deployment.Name)
94-
95-
output, err := cmd.CombinedOutput()
96-
Expect(err).NotTo(HaveOccurred())
97-
98-
Expect(string(output)).To(ContainSubstring("GET / HTTP/1.1"))
99-
Expect(string(output)).To(ContainSubstring("GET /does-not-exist HTTP/1.1"))
100-
101-
cmd = exec.Command("docker", "container", "exec", deployment.Name, "stat", "app/nginx/logs/access.log", "app/nginx/logs/error.log")
102-
Expect(cmd.Run()).To(Succeed())
93+
Eventually(func() string {
94+
logs, _ := deployment.RuntimeLogs()
95+
return logs
96+
}, "10s", "1s").Should(Or(
97+
ContainSubstring("GET / HTTP/1.1"),
98+
ContainSubstring("GET /does-not-exist HTTP/1.1"),
99+
))
100+
101+
if settings.Platform == "docker" {
102+
cmd := exec.Command("docker", "container", "exec", deployment.Name, "stat", "app/nginx/logs/access.log", "app/nginx/logs/error.log")
103+
Expect(cmd.Run()).To(Succeed())
104+
}
103105
})
104106
})
105107

0 commit comments

Comments
 (0)