Skip to content

Commit

Permalink
Merge pull request #8019 from killianmuldoon/fix/runtime-hook-test
Browse files Browse the repository at this point in the history
🐛  Remove exact path match from walkTemplate test
  • Loading branch information
k8s-ci-robot authored Jan 30, 2023
2 parents 351ab33 + 3fb2551 commit d55849a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func Test_WalkTemplates(t *testing.T) {
CommonResponse: runtimehooksv1.CommonResponse{
Status: runtimehooksv1.ResponseStatusFailure,
Message: "no kind \"Unknown\" is registered for version \"controlplane.cluster.x-k8s." +
"io/v1beta1\" in scheme \"pkg/runtime/scheme.go:100\"",
"io/v1beta1\" in scheme",
},
},
options: []WalkTemplatesOption{
Expand Down Expand Up @@ -225,7 +225,7 @@ func Test_WalkTemplates(t *testing.T) {
WalkTemplates(context.Background(), decoder, request, response, mutatingFunc, tt.options...)

g.Expect(response.Status).To(Equal(tt.expectedResponse.Status))
g.Expect(response.Message).To(Equal(tt.expectedResponse.Message))
g.Expect(response.Message).To(ContainSubstring(tt.expectedResponse.Message))
for i, item := range response.Items {
expectedItem := tt.expectedResponse.Items[i]
g.Expect(item.PatchType).To(Equal(expectedItem.PatchType))
Expand Down

0 comments on commit d55849a

Please sign in to comment.