Skip to content

Commit 87245ea

Browse files
committed
fix: test case to check Malformed version error
- To do case-insenstive match of the expected value. - As the test case fails with latest dependencies because the error string has been changed from "Malformed..." to "malformed..."
1 parent 1945033 commit 87245ea

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

credhub/set_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ var _ = Describe("Set", func() {
114114
ch, err := New("https://example.com", ServerVersion("invalid-version"))
115115
Expect(err).ToNot(HaveOccurred())
116116
_, err = ch.SetCredential("some-credential", "some-type", "some-value")
117-
Expect(err).To(MatchError("Malformed version: invalid-version"))
117+
Expect(err).ToNot(BeNil())
118+
Expect(err.Error()).To(MatchRegexp("(?i)malformed version: invalid-version"))
118119
})
119120

120121
It("returns an error when request fails", func() {

0 commit comments

Comments
 (0)