Skip to content

Commit

Permalink
Merge pull request #997 from cloudfoundry/readiness-hc-events
Browse files Browse the repository at this point in the history
update readiness health check test to test audit events
  • Loading branch information
jochenehret authored Jan 22, 2024
2 parents 6ec60a8 + f1bcdfa commit 974b7f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions apps/readiness_healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ var _ = AppsDescribe("Readiness Healthcheck", func() {
return helpers.CurlApp(Config, appName, "/ready")
}, Config.DefaultTimeoutDuration()).Should(ContainSubstring("200 - ready"))

// TODO: only include this when audit events are built
// Eventually(cf.Cf("events", appName)).Should(Say("app.ready"))
Eventually(cf.Cf("events", appName)).Should(Say("app.process.ready"))

Expect(logs.Recent(appName).Wait()).To(Say("Container passed the readiness health check"))

Expand All @@ -61,8 +60,7 @@ var _ = AppsDescribe("Readiness Healthcheck", func() {

By("verifying the app is marked as not ready")

// TODO: only include this when audit events are built
// Eventually(cf.Cf("events", appName)).Should(Say("app.notready"))
Eventually(cf.Cf("events", appName)).Should(Say("app.process.not-ready"))

Eventually(func() BufferProvider { return logs.Recent(appName).Wait() }, readinessHealthCheckTimeout).Should(Say("Container failed the readiness health check"))

Expand Down
6 changes: 2 additions & 4 deletions windows/readiness_healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ var _ = WindowsDescribe("Readiness Healthcheck", func() {
return helpers.CurlApp(Config, appName, "/ready")
}, Config.DefaultTimeoutDuration()).Should(ContainSubstring("200 - ready"))

// TODO: only include this when audit events are built
// Eventually(cf.Cf("events", appName)).Should(Say("app.ready"))
Eventually(cf.Cf("events", appName)).Should(Say("app.process.ready"))

Expect(logs.Recent(appName).Wait()).To(Say("Container passed the readiness health check"))

Expand All @@ -62,8 +61,7 @@ var _ = WindowsDescribe("Readiness Healthcheck", func() {

By("verifying the app is marked as not ready")

// TODO: only include this when audit events are built
// Eventually(cf.Cf("events", appName)).Should(Say("app.notready"))
Eventually(cf.Cf("events", appName)).Should(Say("app.process.not-ready"))

Eventually(func() BufferProvider { return logs.Recent(appName).Wait() }, readinessHealthCheckTimeout).Should(Say("Container failed the readiness health check"))

Expand Down

0 comments on commit 974b7f3

Please sign in to comment.