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

Remove flaky checksum test #774

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

anmazzotti
Copy link
Contributor

Just a little thing bugging me.
The "unmanaged reset plan" is a simple sentinel file containing a time.Now() timestamp.

We didn't expose the controller's clock to make it testable, so the checksum test has chances to fail on a slow machine (precision is seconds).

will look like:

handle unmanaged finalizer [It] should update secret with reset plan when unmanaged annotation is true
/elemental-operator/controllers/machineinventory_controller_test.go:644

  [FAILED] Expected
      <string>: "cef759..."
  to equal       |
      <string>: "457f15..."
  In [It] at: /elemental-operator/controllers/machineinventory_controller_test.go:661 @ 06/21/24 13:08:13.001

Simplest solution is to remove this test for this plan, since the same logic is already tested by the similar "should update secret with reset plan" test.

@anmazzotti anmazzotti requested a review from a team as a code owner June 21, 2024 11:18
@github-actions github-actions bot added the area/tests test related changes label Jun 21, 2024
@anmazzotti anmazzotti self-assigned this Jun 21, 2024
Signed-off-by: Andrea Mazzotti <[email protected]>
@anmazzotti anmazzotti force-pushed the improve_flaky_test branch from 1cf31ce to 632cd47 Compare June 24, 2024 12:39
Copy link
Member

@fgiudici fgiudici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anmazzotti anmazzotti merged commit 27a785e into rancher:main Jun 25, 2024
18 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests test related changes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants