Skip to content

Commit

Permalink
🏃 removed the error message checking from the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
droot committed Apr 23, 2019
1 parent 16edb6e commit 7cf7a99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pkg/conversion/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

/*
Package conversion provides interface definitions that an API Type needs to
implement in order to be supported by the generic conversion webhook handler
implement for it to be supported by the generic conversion webhook handler
defined under pkg/webhook/conversion.
*/
package conversion
Expand Down
2 changes: 1 addition & 1 deletion pkg/webhook/conversion/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
/*
Package conversion provides implementation for CRD conversion webhook that implements handler for version conversion requests for types that are convertible.
See pkg/conversion for interface definitions required to ensure a Type is convertible.
See pkg/conversion for interface definitions required to ensure an API Type is convertible.
*/
package conversion

Expand Down
11 changes: 3 additions & 8 deletions pkg/webhook/conversion/conversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ var _ = Describe("Conversion Webhook", func() {
}

convReview := doRequest(convReq)
Expect(convReview.Response.Result.Message).Should(
ContainSubstring(`no kind "ExternalJob" is registered for version`))
Expect(convReview.Response.Result.Status).To(Equal("Failure"))
Expect(convReview.Response.ConvertedObjects).Should(BeEmpty())
})

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

convReview := doRequest(convReq)

Expect(convReview.Response.Result.Message).To(
Equal("conversion is not allowed between same type *v1.ExternalJob"))
Expect(convReview.Response.Result.Status).To(Equal("Failure"))
Expect(convReview.Response.ConvertedObjects).Should(BeEmpty())
})

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

convReview := doRequest(convReq)

Expect(convReview.Response.Result.Message).To(
Equal("*v1beta1.Deployment is not convertible to *v1.Deployment"))
Expect(convReview.Response.Result.Status).To(Equal("Failure"))
Expect(convReview.Response.ConvertedObjects).Should(BeEmpty())
})

Expand Down

0 comments on commit 7cf7a99

Please sign in to comment.