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(tests): possible out of range in integration #4305

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

geyslan
Copy link
Member

@geyslan geyslan commented Sep 17, 2024

Close: #4255

1. Explain what the PR does

cd4862a fix(tests): use ExpectAtLeastOneForEach

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.

11a262b fix(tests): possible out of range in integration

ExpectAllInOrderSequentially might try to access an index out of range
depending on the number of events that are being checked.

More about in issue #4255.

2. Explain how to test it

3. Other comments

ExpectAllInOrderSequentially might try to access an index out of range
depending on the number of events that are being checked.

More about in issue aquasecurity#4255.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants