Skip to content

Commit 7d67d72

Browse files
committed
Adjust error message for psycopg2 on cflinuxfs4
1 parent b387533 commit 7d67d72

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/python/brats/brats_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ var _ = Describe("Python buildpack", func() {
3333
Expect(bcrypt.CompareHashAndPassword([]byte(hashedPassword), []byte("Hello, bcrypt"))).ToNot(HaveOccurred())
3434
})
3535
By("supports postgres by raising a no connection error", func() {
36-
Expect(app.GetBody("/pg")).To(ContainSubstring("could not connect to server: No such file or directory"))
36+
Expect(app.GetBody("/pg")).To(
37+
Or(
38+
// cflinuxfs3 and cflinuxfs4 have different messages for the same error.
39+
ContainSubstring("could not connect to server: No such file or directory"),
40+
ContainSubstring("failed: No such file or directory"),
41+
),
42+
)
3743
})
3844
By("supports mysql by raising a no connection error", func() {
3945
Expect(app.GetBody("/mysql")).To(ContainSubstring("Can't connect to local MySQL server through socket"))

0 commit comments

Comments
 (0)