mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
fix build error
This commit is contained in:
parent
e3123e96b6
commit
d0a1acbac4
2 changed files with 2 additions and 3 deletions
|
@ -313,7 +313,6 @@ func checkResource(ctx context.EvalInterface, newResourceSpec interface{}, resou
|
||||||
func generatePV(gr kyverno.GenerateRequest, resource unstructured.Unstructured, err *Violation) policyviolation.Info {
|
func generatePV(gr kyverno.GenerateRequest, resource unstructured.Unstructured, err *Violation) policyviolation.Info {
|
||||||
|
|
||||||
info := policyviolation.Info{
|
info := policyviolation.Info{
|
||||||
Blocked: false,
|
|
||||||
PolicyName: gr.Spec.Policy,
|
PolicyName: gr.Spec.Policy,
|
||||||
Resource: resource,
|
Resource: resource,
|
||||||
Rules: []kyverno.ViolatedRule{kyverno.ViolatedRule{
|
Rules: []kyverno.ViolatedRule{kyverno.ViolatedRule{
|
||||||
|
|
|
@ -166,7 +166,7 @@ func TestGeneratePodControllerRule_Mutate(t *testing.T) {
|
||||||
patches, errs := generatePodControllerRule(policy)
|
patches, errs := generatePodControllerRule(policy)
|
||||||
assert.Assert(t, len(errs) == 0)
|
assert.Assert(t, len(errs) == 0)
|
||||||
|
|
||||||
p, err := engine.ApplyPatches(policyRaw, patches)
|
p, err := utils.ApplyPatches(policyRaw, patches)
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
|
||||||
expectedPolicy := []byte(`{
|
expectedPolicy := []byte(`{
|
||||||
|
@ -474,7 +474,7 @@ func TestGeneratePodControllerRule_ValidatePattern(t *testing.T) {
|
||||||
patches, errs := generatePodControllerRule(policy)
|
patches, errs := generatePodControllerRule(policy)
|
||||||
assert.Assert(t, len(errs) == 0)
|
assert.Assert(t, len(errs) == 0)
|
||||||
|
|
||||||
p, err := engine.ApplyPatches(policyRaw, patches)
|
p, err := utils.ApplyPatches(policyRaw, patches)
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
|
||||||
expectedPolicy := []byte(`{
|
expectedPolicy := []byte(`{
|
||||||
|
|
Loading…
Add table
Reference in a new issue