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

🌱 Update tests to use same envtest helper, add eventual checks for cache consistency #395

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

Danil-Grigorev
Copy link
Contributor

@Danil-Grigorev Danil-Grigorev commented Feb 22, 2024

kind/chore

What this PR does / why we need it:
This is a refactor of unit tests, which ensures there is no flakes in unit test and moves all tests to a single envtest utility helper across the repo.

This helper already sets up manager instance for the cluster, allowing to write integration tests on our controllers, including testing watch predicates in conjunction.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Checklist:

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

@Danil-Grigorev Danil-Grigorev requested a review from a team as a code owner February 22, 2024 14:01
@Danil-Grigorev Danil-Grigorev force-pushed the unify-envtest-helper branch 4 times, most recently from 08db2b8 to 74e4059 Compare February 22, 2024 14:56
richardcase
richardcase previously approved these changes Feb 22, 2024
salasberryfin
salasberryfin previously approved these changes Feb 23, 2024
@salasberryfin
Copy link
Contributor

I'd say we should have this merged before #362 so we can re-use the new test helpers without generating conflicts.

@Danil-Grigorev
Copy link
Contributor Author

@salasberryfin Agree, let me push a round of changes to include komega use across tests, as the combination of Eventually + cl.Get was a pain point for me. Have some changes in another branch I’d like to propagate here + a discovered issue with predicate logic (we can import any cluster on an error in object lookup…) and it should be ready to merge

@Danil-Grigorev Danil-Grigorev force-pushed the unify-envtest-helper branch 3 times, most recently from 973f222 to ae22d09 Compare February 23, 2024 11:02
…e consistency

Signed-off-by: Danil Grigorev <danil.grigorev@suse.com>
Signed-off-by: Danil Grigorev <danil.grigorev@suse.com>
@richardcase richardcase merged commit 904e164 into rancher:main Feb 23, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants