From 4eff0e9a8c392515bd881a7a2e7d066ffa29a282 Mon Sep 17 00:00:00 2001 From: Shuting Zhao Date: Fri, 10 Jan 2020 18:31:43 -0800 Subject: [PATCH] fix build error --- pkg/engine/variables/validatevariables_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/engine/variables/validatevariables_test.go b/pkg/engine/variables/validatevariables_test.go index 46209f6375..c71a966bdd 100644 --- a/pkg/engine/variables/validatevariables_test.go +++ b/pkg/engine/variables/validatevariables_test.go @@ -3,7 +3,6 @@ package variables import ( "encoding/json" "fmt" - "reflect" "testing" kyverno "github.com/nirmata/kyverno/pkg/api/kyverno/v1" @@ -43,7 +42,7 @@ func Test_ExtractVariables(t *testing.T) { vars := extractVariables(pattern) result := []string{"{{request.userInfo.username}}", "request.userInfo.username", "{{request.object.metadata.name}}", "request.object.metadata.name"} - assert.Assert(t, reflect.DeepEqual(vars, result), fmt.Sprintf("result does not match, var: %s", vars)) + assert.Assert(t, len(vars) == len(result), fmt.Sprintf("result does not match, var: %s", vars)) } func Test_ValidateVariables_NoVariable(t *testing.T) {