Skip to content

Commit 18f1ef0

Browse files
committed
add check runtime logs for tests and bump switchblade where we introduced this
1 parent a24f71e commit 18f1ef0

12 files changed

Lines changed: 158 additions & 37 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.24.0
44

55
require (
66
github.com/cloudfoundry/libbuildpack v0.0.0-20251203175254-7be530ec9fef
7-
github.com/cloudfoundry/switchblade v0.9.2
7+
github.com/cloudfoundry/switchblade v0.9.3
88
github.com/onsi/ginkgo/v2 v2.27.2
99
github.com/onsi/gomega v1.38.2
1010
github.com/sclevine/spec v1.4.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
812812
github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
813813
github.com/cloudfoundry/libbuildpack v0.0.0-20251203175254-7be530ec9fef h1:lrggsL5p4dr3bBK/x1xIu3sn/6PGYV71GQIe/mCNfFw=
814814
github.com/cloudfoundry/libbuildpack v0.0.0-20251203175254-7be530ec9fef/go.mod h1:kn4FHMwI8bTd9gT92wPGjXHzUvGcj8CkPxG8q3AGBAQ=
815-
github.com/cloudfoundry/switchblade v0.9.2 h1:b2lwxrAblg9uKncNQRKZ09/teuKdZIixcENKgrLQPjo=
816-
github.com/cloudfoundry/switchblade v0.9.2/go.mod h1:hIEQdGAsuNnzlyQfsD5OIORt38weSBar6Wq5/JX6Omo=
815+
github.com/cloudfoundry/switchblade v0.9.3 h1:BTtnDoWkClfzvlwWm37mylu0eFCZTwN62MtkskFOB2c=
816+
github.com/cloudfoundry/switchblade v0.9.3/go.mod h1:hIEQdGAsuNnzlyQfsD5OIORt38weSBar6Wq5/JX6Omo=
817817
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
818818
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
819819
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=

src/php/integration/modules_test.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,9 @@ func testModules(platform switchblade.Platform, fixtures string) func(*testing.T
139139
Eventually(deployment).Should(Serve("").WithExpectedStatusCode(500))
140140

141141
Eventually(func() string {
142-
cmd := exec.Command("docker", "container", "logs", deployment.Name)
143-
output, err := cmd.CombinedOutput()
142+
logs, err := deployment.RuntimeLogs()
144143
Expect(err).NotTo(HaveOccurred())
145-
return string(output)
144+
return logs
146145
}).Should(
147146
ContainSubstring("PHP message: PHP Fatal error: Uncaught AMQPConnectionException"),
148147
)
@@ -193,10 +192,9 @@ func testModules(platform switchblade.Platform, fixtures string) func(*testing.T
193192
).WithExpectedStatusCode(500))
194193

195194
Eventually(func() string {
196-
cmd := exec.Command("docker", "container", "logs", deployment.Name)
197-
output, err := cmd.CombinedOutput()
195+
logs, err := deployment.RuntimeLogs()
198196
Expect(err).NotTo(HaveOccurred())
199-
return string(output)
197+
return logs
200198
}).Should(Or(
201199
ContainSubstring("PHP message: PHP Fatal error: Uncaught RedisException: Connection refused"),
202200
ContainSubstring("PHP message: PHP Fatal error: Uncaught RedisException: Cannot assign requested address"),

src/php/integration/web_servers_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,9 @@ func testWebServers(platform switchblade.Platform, fixtures string) func(*testin
119119
)
120120

121121
Eventually(func() string {
122-
cmd := exec.Command("docker", "container", "logs", deployment.Name)
123-
output, err := cmd.CombinedOutput()
122+
logs, err := deployment.RuntimeLogs()
124123
Expect(err).NotTo(HaveOccurred())
125-
return string(output)
124+
return logs
126125
}).Should(
127126
Not(ContainSubstring("Invalid command 'RequestHeader'")),
128127
)

vendor/github.com/cloudfoundry/switchblade/README.md

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cloudfoundry/switchblade/cloudfoundry.go

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cloudfoundry/switchblade/deployment.go

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cloudfoundry/switchblade/docker.go

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cloudfoundry/switchblade/internal/cloudfoundry/logs.go

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cloudfoundry/switchblade/internal/cloudfoundry/stage.go

Lines changed: 3 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)