-
Notifications
You must be signed in to change notification settings - Fork 247
Convert drift e2e tests into integration tests #2861
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1fae0d0
to
1882b6e
Compare
411d828
to
8f693ef
Compare
This commit is meant to test a hypothesis about flakiness of drift correction tests coming from a race condition between: * the Fleet agent's Helm release cleanup mechanism, which deletes releases for which no bundle exists, at a configurable frequency (previously set to 1s for testing purposes) * deletion of bundle deployments, re-created by Fleet controllers when a `GitRepo` is updated. Release cleanup end-to-end tests, which depend on a short garbage collection interval, are skipped to prevent noise caused by unrelated test failures.
Would the first call to garbage collection be enough to cause a race condition?
That bundle reconciler method creates bundle deployments, not bundles.
This reverts commit c20de5d.
This reverts commit f1d3e6b.
This migrates an end-to-end test case for disabled drift correction to integration tests, as the first step of a larger effort to migrate as many of them as possible.
This removes checks on bundle statuses, which are unrelated to drift correction and already covered in status tests (`integrationtests/agent/bundle_deployment_status_test.go`
This paves the way for migrating more drift correction tests away from end-to-end tests.
This migrates another drift correction test from end-to-end to integration.
Editing a config map with drift correction enabled but not forced is now covered by integration tests instead of end-to-end tests.
Editing a service port with drift correction enabled and forced is now covered by integration tests instead of end-to-end tests.
Deploying a resource with a status with drift correction enabled is now covered by integration tests instead of end-to-end tests.
Editing a deployment with drift correction enabled but not forced is now covered by integration tests instead of end-to-end tests.
Updating a bundle deployment to force its drift correction mode, and fix drift correction failures, is now covered by integration tests instead of end-to-end tests.
All existing drift correction cases are now covered in integration tests.
This fixes a failing test case where rollbacks would not be forced because the bundle deployment's `CorrectDrift` mode was set to `true` in its options, where it should have been done directly in its spec.
That end-to-end test case was flaky, and could easily be migrated to integration tests.
df64742
to
a0e92bf
Compare
manno
approved these changes
Sep 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash :)
weyfonk
added a commit
to weyfonk/fleet
that referenced
this pull request
Sep 27, 2024
* Simplify drift correction integration tests This removes checks on bundle statuses, which are unrelated to drift correction and already covered in status tests (`integrationtests/agent/bundle_deployment_status_test.go`). * Migrate drift correction end-to-end tests This migrates end-to-end test cases for drift correction to integration tests, simplifying them and reducing the risk of flakiness. * Rename `createBundle` as `createBundleDeployment` That bundle reconciler method creates bundle deployments, not bundles. * Convert bundle deletion e2e test into integration test That end-to-end test case was flaky, and could easily be migrated to integration tests.
thardeck
pushed a commit
that referenced
this pull request
Oct 1, 2024
* Convert drift e2e tests into integration tests (#2861) * Simplify drift correction integration tests This removes checks on bundle statuses, which are unrelated to drift correction and already covered in status tests (`integrationtests/agent/bundle_deployment_status_test.go`). * Migrate drift correction end-to-end tests This migrates end-to-end test cases for drift correction to integration tests, simplifying them and reducing the risk of flakiness. * Rename `createBundle` as `createBundleDeployment` That bundle reconciler method creates bundle deployments, not bundles. * Convert bundle deletion e2e test into integration test That end-to-end test case was flaky, and could easily be migrated to integration tests. * Skip `e2e/drift` in CI workflows That path no longer exists, therefore `ginkgo` must no longer be called with it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit is meant to test a hypothesis about flakiness of drift correction tests coming from a race condition between:
GitRepo
is updated.Release cleanup end-to-end tests, which depend on a short garbage collection interval, are skipped to prevent noise caused by unrelated test failures.
Refers to #2858
Refers to #2771.