Skip to content

Commit 50a6016

Browse files
committed
test: update DeletionBlockedByUsageWebhook to handle error wrapping
Signed-off-by: Jared Watts <[email protected]>
1 parent 839545a commit 50a6016

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/e2e/funcs/feature.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ func DeletionBlockedByUsageWebhook(dir, pattern string, options ...decoder.Decod
11201120
return ctx
11211121
}
11221122

1123-
if !strings.HasPrefix(err.Error(), "admission webhook \"nousages.apiextensions.crossplane.io\" denied the request") {
1123+
if !strings.Contains(err.Error(), "admission webhook \"nousages.apiextensions.crossplane.io\" denied the request") {
11241124
t.Fatalf("expected the usage webhook to deny the request but it failed with err: %s", err.Error())
11251125
return ctx
11261126
}

0 commit comments

Comments
 (0)