Skip to content

Commit dda37c2

Browse files
committed
Fix offline test log matcher to use ContainSubstring
The offline test was using ContainLines() to check for 'Generating autoload files' in the logs, which fails on Cloud Foundry because the logs channel may be consumed or closed after deployment completes, making line-by-line matching unreliable. Changed to use ContainSubstring() wrapped in SatisfyAll(), matching the pattern used by all other working tests (composer_test.go, modules_test.go, etc.). This fixes the test failure that occurred only on Cloud Foundry platform where the test would timeout after 30 seconds even though the message was present in the staging logs.
1 parent 82eaf7d commit dda37c2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/php/integration/offline_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ func testOffline(platform switchblade.Platform, fixtures string) func(*testing.T
4343
Execute(name, filepath.Join(fixtures, "vendored"))
4444
Expect(err).NotTo(HaveOccurred())
4545

46-
Eventually(logs).Should(
47-
ContainLines("Generating autoload files"),
48-
)
46+
Eventually(logs).Should(SatisfyAll(
47+
ContainSubstring("Generating autoload files"),
48+
))
4949

5050
Eventually(deployment).Should(Serve(
5151
ContainSubstring("<p>App with dependencies running</p>"),

0 commit comments

Comments
 (0)