Skip to content

Commit

Permalink
Add isError to expected output
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Conner <[email protected]>
  • Loading branch information
knrc committed Apr 30, 2024
1 parent f3a0b62 commit 3a98516
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions k8s/validatingadmissionpolicy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,13 @@ func TestValidationEval(t *testing.T) {
Value: "default",
Cost: uint64ptr(6),
}, {
Name: "containers",
Error: strptr("unexpected error evaluating expression containers: no such key: spc"),
Name: "containers",
IsError: true,
Error: strptr("unexpected error evaluating expression containers: no such key: spc"),
}},
Validations: []*k8s.EvalResult{{
Error: strptr("unexpected error evaluating expression 'variables.foo == 'default' && variables.containers.all(c, c.image.startsWith(\"test\"))', caused by nested exception: 'no such key: spc'"),
IsError: true,
Error: strptr("unexpected error evaluating expression 'variables.foo == 'default' && variables.containers.all(c, c.image.startsWith(\"test\"))', caused by nested exception: 'no such key: spc'"),
}},
AuditAnnotations: []*k8s.EvalResult{{
Name: strptr("foo-label"),
Expand Down

0 comments on commit 3a98516

Please sign in to comment.