Skip to content

Commit

Permalink
Use correct ready check in AuthZ conformance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr committed Aug 20, 2024
1 parent bf945f9 commit 0a3c370
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 0a3c370

Please sign in to comment.