From 3fb25518879249be57e409e1aebcd1de86265b41 Mon Sep 17 00:00:00 2001 From: killianmuldoon Date: Mon, 30 Jan 2023 10:00:11 +0000 Subject: [PATCH] Remove exact path match from walkTemplate test --- .../topologymutation/{walkler_test.go => walker_test.go} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename exp/runtime/topologymutation/{walkler_test.go => walker_test.go} (98%) diff --git a/exp/runtime/topologymutation/walkler_test.go b/exp/runtime/topologymutation/walker_test.go similarity index 98% rename from exp/runtime/topologymutation/walkler_test.go rename to exp/runtime/topologymutation/walker_test.go index 7644ef1ab4d3..52c0e60fb7b5 100644 --- a/exp/runtime/topologymutation/walkler_test.go +++ b/exp/runtime/topologymutation/walker_test.go @@ -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{ @@ -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))