Skip to content

Commit 7cf7a99

Browse files
committed
🏃 removed the error message checking from the tests
1 parent 16edb6e commit 7cf7a99

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

pkg/conversion/conversion.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616

1717
/*
1818
Package conversion provides interface definitions that an API Type needs to
19-
implement in order to be supported by the generic conversion webhook handler
19+
implement for it to be supported by the generic conversion webhook handler
2020
defined under pkg/webhook/conversion.
2121
*/
2222
package conversion

pkg/webhook/conversion/conversion.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
/*
1818
Package conversion provides implementation for CRD conversion webhook that implements handler for version conversion requests for types that are convertible.
1919
20-
See pkg/conversion for interface definitions required to ensure a Type is convertible.
20+
See pkg/conversion for interface definitions required to ensure an API Type is convertible.
2121
*/
2222
package conversion
2323

pkg/webhook/conversion/conversion_test.go

+3-8
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ var _ = Describe("Conversion Webhook", func() {
145145
}
146146

147147
convReview := doRequest(convReq)
148-
Expect(convReview.Response.Result.Message).Should(
149-
ContainSubstring(`no kind "ExternalJob" is registered for version`))
148+
Expect(convReview.Response.Result.Status).To(Equal("Failure"))
150149
Expect(convReview.Response.ConvertedObjects).Should(BeEmpty())
151150
})
152151

@@ -167,9 +166,7 @@ var _ = Describe("Conversion Webhook", func() {
167166
}
168167

169168
convReview := doRequest(convReq)
170-
171-
Expect(convReview.Response.Result.Message).To(
172-
Equal("conversion is not allowed between same type *v1.ExternalJob"))
169+
Expect(convReview.Response.Result.Status).To(Equal("Failure"))
173170
Expect(convReview.Response.ConvertedObjects).Should(BeEmpty())
174171
})
175172

@@ -199,9 +196,7 @@ var _ = Describe("Conversion Webhook", func() {
199196
}
200197

201198
convReview := doRequest(convReq)
202-
203-
Expect(convReview.Response.Result.Message).To(
204-
Equal("*v1beta1.Deployment is not convertible to *v1.Deployment"))
199+
Expect(convReview.Response.Result.Status).To(Equal("Failure"))
205200
Expect(convReview.Response.ConvertedObjects).Should(BeEmpty())
206201
})
207202

0 commit comments

Comments
 (0)