Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Use correct readyness check in AuthZ conformance tests #8167

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/rekt/features/authz/addressable_authz_conformance.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func addressableAllowsAuthorizedRequest(gvr schema.GroupVersionResource, kind, n
eventpolicy.WithFromSubject(fmt.Sprintf("system:serviceaccount:%s:%s", namespace, sourceSubject)),
)(ctx, t)
})
f.Setup(fmt.Sprintf("EventPolicy for %s %s is ready", kind, name), k8s.IsReady(gvr, name))
f.Setup(fmt.Sprintf("EventPolicy for %s %s is ready", kind, name), k8s.IsReady(eventpolicy.GVR(), eventPolicy))

// Install source
f.Requirement("install source", eventshub.Install(
Expand Down Expand Up @@ -110,7 +110,7 @@ func addressableRejectsUnauthorizedRequest(gvr schema.GroupVersionResource, kind
name),
eventpolicy.WithFromSubject("system:serviceaccount:default:unknown-identity"),
))
f.Setup(fmt.Sprintf("EventPolicy for %s %s is ready", kind, name), k8s.IsReady(gvr, name))
f.Setup(fmt.Sprintf("EventPolicy for %s %s is ready", kind, name), k8s.IsReady(eventpolicy.GVR(), eventPolicy))

// Install source
f.Requirement("install source", eventshub.Install(
Expand Down Expand Up @@ -166,7 +166,7 @@ func addressableRespectsEventPolicyFilters(gvr schema.GroupVersionResource, kind
}),
)(ctx, t)
})
f.Setup(fmt.Sprintf("EventPolicy for %s %s is ready", kind, name), k8s.IsReady(gvr, name))
f.Setup(fmt.Sprintf("EventPolicy for %s %s is ready", kind, name), k8s.IsReady(eventpolicy.GVR(), eventPolicy))

// Install source
f.Requirement("install source 1", eventshub.Install(
Expand Down Expand Up @@ -213,7 +213,7 @@ func addressableBecomesUnreadyOnUnreadyEventPolicy(gvr schema.GroupVersionResour
name),
eventpolicy.WithFromRef(pingsource.Gvr().GroupVersion().WithKind("PingSource"), "doesnt-exist", "doesnt-exist"),
))
f.Requirement(fmt.Sprintf("EventPolicy for %s %s is NotReady", kind, name), k8s.IsNotReady(gvr, name))
f.Requirement(fmt.Sprintf("EventPolicy for %s %s is NotReady", kind, name), k8s.IsNotReady(eventpolicy.GVR(), eventPolicy))

f.Alpha(kind).Must("become NotReady with NotReady EventPolicy ", k8s.IsNotReady(gvr, name))

Expand Down
Loading