Skip to content

Commit f7f7964

Browse files
committed
test(apps): add acceptance test for Cloud Controller API log emission
Cloud Controller emits lifecycle log messages (e.g. "Created app with guid ...") via loggregator under the [API/*] source tag when processing an app push. This test verifies those logs appear in the app's recent log stream, providing an end-to-end check that the loggregator emitter in CCNG correctly forwards messages through the loggregator v2 gRPC client introduced in cloudfoundry/cloud_controller_ng#5043.
1 parent 1731314 commit f7f7964

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

apps/running_log.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,10 @@ var _ = AppsDescribe("app logs", func() {
6060
return logs.Recent(appName).Wait().Out
6161
}).Should(Say(fmt.Sprintf("\\[APP(.*)/0\\]\\s*ERR %s", message)))
6262
})
63+
64+
It("captures [API/*] logs emitted by the Cloud Controller", func() {
65+
Eventually(func() *Buffer {
66+
return logs.Recent(appName).Wait().Out
67+
}).Should(Say(`\[API/\d+\]\s*OUT Created app with guid `))
68+
})
6369
})

0 commit comments

Comments
 (0)