Skip to content

Commit

Permalink
Add more events to test the any filter
Browse files Browse the repository at this point in the history
Signed-off-by: Leo Li <[email protected]>
  • Loading branch information
Leo6Leo committed Sep 5, 2023
1 parent ba6f7b8 commit 8692e8d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions test/experimental/features/new_trigger_filters/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,26 @@ func AllFilterFeature(brokerName string) *feature.Feature {
f := feature.NewFeature()

eventContexts := []CloudEventsContext{
{
eventType: "exact.prefix.suffix.event.type",
shouldDeliver: true,
},
// This event matches no filters
{
eventType: "not.event.type",
shouldDeliver: false,
},
// This event matches 2 filters: prefix and CESQL.
{
eventType: "exact.prefix.suffix.event",
shouldDeliver: false, // This should not get delivered as not all filters match.
},
// This event matches 3 filters: CESQL, Prefix, and Suffix.
{
eventType: "exact.prefix.suffix.event.suffix.event.type",
shouldDeliver: false, // This should not get delivered as not all filters match.
},
// This event will match all 4 filters.
{
eventType: "exact.prefix.suffix.event.type",
shouldDeliver: true,
},
}

filters := []eventingv1.SubscriptionsAPIFilter{
Expand Down

0 comments on commit 8692e8d

Please sign in to comment.