From d0a1acbac414ad9832838f2447bd3f784aaf79ca Mon Sep 17 00:00:00 2001 From: Shuting Zhao Date: Wed, 8 Jan 2020 16:56:41 -0800 Subject: [PATCH] fix build error --- pkg/generate/generate.go | 1 - pkg/webhooks/policymutation_test.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/generate/generate.go b/pkg/generate/generate.go index 2a120c605f..91ebe7cf43 100644 --- a/pkg/generate/generate.go +++ b/pkg/generate/generate.go @@ -313,7 +313,6 @@ func checkResource(ctx context.EvalInterface, newResourceSpec interface{}, resou func generatePV(gr kyverno.GenerateRequest, resource unstructured.Unstructured, err *Violation) policyviolation.Info { info := policyviolation.Info{ - Blocked: false, PolicyName: gr.Spec.Policy, Resource: resource, Rules: []kyverno.ViolatedRule{kyverno.ViolatedRule{ diff --git a/pkg/webhooks/policymutation_test.go b/pkg/webhooks/policymutation_test.go index c548acb9d8..0b5af63c59 100644 --- a/pkg/webhooks/policymutation_test.go +++ b/pkg/webhooks/policymutation_test.go @@ -166,7 +166,7 @@ func TestGeneratePodControllerRule_Mutate(t *testing.T) { patches, errs := generatePodControllerRule(policy) assert.Assert(t, len(errs) == 0) - p, err := engine.ApplyPatches(policyRaw, patches) + p, err := utils.ApplyPatches(policyRaw, patches) assert.NilError(t, err) expectedPolicy := []byte(`{ @@ -474,7 +474,7 @@ func TestGeneratePodControllerRule_ValidatePattern(t *testing.T) { patches, errs := generatePodControllerRule(policy) assert.Assert(t, len(errs) == 0) - p, err := engine.ApplyPatches(policyRaw, patches) + p, err := utils.ApplyPatches(policyRaw, patches) assert.NilError(t, err) expectedPolicy := []byte(`{