Skip to content

Commit

Permalink
Fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
pns-nirmata committed Sep 26, 2023
1 parent 02af8ee commit 03cf285
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/engine/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3199,9 +3199,8 @@ func Test_delete_ignore_pattern(t *testing.T) {
assert.Equal(t, len(engineResponseCreate.PolicyResponse.Rules), 1)
assert.Equal(t, engineResponseCreate.PolicyResponse.Rules[0].Status(), engineapi.RuleStatusFail)

policyContextDelete := NewPolicyContextWithJsonContext(kyvernov1.Create, ctx).
WithPolicy(&policy).
WithOldResource(*resourceUnstructured)
policyContextDelete := NewPolicyContextWithJsonContext(kyvernov1.Delete, ctx).
WithPolicy(&policy)

engineResponseDelete := testValidate(context.TODO(), registryclient.NewOrDie(), policyContextDelete, cfg, nil)
assert.Equal(t, len(engineResponseDelete.PolicyResponse.Rules), 0)
Expand Down

0 comments on commit 03cf285

Please sign in to comment.