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

test: use gomega's ContainElements #324

Conversation

salasberryfin
Copy link
Contributor

@salasberryfin salasberryfin commented May 15, 2024

What this PR does / why we need it:

Gomega's HaveExactElements causes intermittent test failures because order is not guaranteed. Since order is not relevant in these scenarios, we could use the alternative ContainElements, which checks the content of the slice but not the order of its elements, plus length validation.

Which issue(s) this PR fixes:
Fixes #241

Special notes for your reviewer:

Checklist:

  • squashed commits into logical changes
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

HaveExactElements causes intermittent failures because order is not
guaranteed

Signed-off-by: Carlos Salas <carlos.salas@suse.com>
@salasberryfin salasberryfin added the kind/bug Something isn't working label May 15, 2024
@salasberryfin salasberryfin marked this pull request as ready for review May 16, 2024 10:01
@alexander-demicev alexander-demicev merged commit 141f4e0 into rancher:main May 16, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests are failing intermittently
3 participants