Skip to content

Commit

Permalink
Add e2e test for Sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr committed May 8, 2024
1 parent 32f59d4 commit b8c7756
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/rekt/features/sequence/oidc_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ func SequenceSendsEventWithOIDCTokenToSteps() *feature.Feature {
Must("Delivers events correctly to steps",
assert.OnStore(step2Name).MatchEvent(
test.HasData([]byte(expectedMsg)),
).AtLeast(1))
).AtLeast(1)).
Must("use sequences identity for OIDC", assert.OnStore(step2Name).MatchWithContext(
assert.MatchKind(eventshub.EventReceived).WithContext(),
assert.MatchOIDCUserFromResource(sequence.GVR(), sequenceName)).Exact(1))

return f
}
Expand Down Expand Up @@ -209,7 +212,10 @@ func SequenceSendsEventWithOIDCTokenToReply() *feature.Feature {
Must("Delivers events correctly to reply",
assert.OnStore(replySinkName).MatchEvent(
test.HasData([]byte(expectedMsg)),
).AtLeast(1))
).AtLeast(1)).
Must("use sequences identity for OIDC", assert.OnStore(replySinkName).MatchWithContext(
assert.MatchKind(eventshub.EventReceived).WithContext(),
assert.MatchOIDCUserFromResource(sequence.GVR(), sequenceName)).Exact(1))

return f
}

0 comments on commit b8c7756

Please sign in to comment.