Skip to content

Commit

Permalink
fix(tests): use ExpectAtLeastOneForEach
Browse files Browse the repository at this point in the history
Two test cases were using ExpectAllInOrderSequentially helper function
and passing by luck, since they emit more events than expected only
beyond the expected events boundary.

For that cases we should use ExpectAtLeastOneForEach helper function
instead.
  • Loading branch information
geyslan committed Sep 25, 2024
1 parent 3f8c90d commit 0c1d041
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/event_filters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ func Test_EventFilters(t *testing.T) {
},
useSyscaller: false,
coolDown: 0,
test: ExpectAllInOrderSequentially,
test: ExpectAtLeastOneForEach,
},
{
name: "pid: trace new (should be empty)",
Expand Down Expand Up @@ -1504,7 +1504,7 @@ func Test_EventFilters(t *testing.T) {
},
useSyscaller: true,
coolDown: 0,
test: ExpectAllInOrderSequentially,
test: ExpectAtLeastOneForEach, // syscaller might emit its own events, so we expect at least one of each
},
{
name: "event: trace execve event set in a specific policy from fakeprog1 command",
Expand Down

0 comments on commit 0c1d041

Please sign in to comment.