Skip to content

Commit

Permalink
codecov: use new error message when predicateType doesn't match
Browse files Browse the repository at this point in the history
Signed-off-by: Hector Fernandez <[email protected]>
  • Loading branch information
hectorj2f committed Feb 21, 2023
1 parent cce9cbf commit 703f4f0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/webhook/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,23 @@ func TestValidatePolicy(t *testing.T) {
},
},
cva: passKeyless,
}, {
name: "simple, wrong predicate keyless attestation, error",
policy: webhookcip.ClusterImagePolicy{
Authorities: []webhookcip.Authority{{
Name: "authority-0",
Keyless: &webhookcip.KeylessRef{
URL: fulcioURL,
},
Attestations: []webhookcip.AttestationPolicy{{
Name: "test-att",
PredicateType: "custom", // attestation with predicate type vuln
}},
},
},
},
wantErrs: []string{"no matching attestations with type custom"},
cva: passKeyless,
}}

for _, test := range tests {
Expand Down

0 comments on commit 703f4f0

Please sign in to comment.