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

Unit Tests: limit warnings, fix racing #1597

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Unit Tests: limit warnings, fix racing #1597

merged 1 commit into from
Jun 13, 2024

Conversation

kuritka
Copy link
Collaborator

@kuritka kuritka commented Jun 11, 2024

This PR is part of a larger whole, where I want to promote dependencies and controller-gen in order to be able to fix unintentional loops, when GSLB or Ingress annotation changes.

Controller tests generate a lot of warnings because the reconciliation does a dig into 127.0.0.1:7753. I wrap to FakeDNS so the dig goes through without warning.

utils.NewFakeDNS(fakeDNSSettings).
  Start().
  RunTestFunc(func() {
         // arrange
         // act
         // assert     
  })

Fixes #974

HOW TO RUN CI ---

By default, all the checks will be run automatically. Furthermore, when changing website-related stuff, the preview will be generated by the netlify bot.

Heavy tests

Add the heavy-tests label on this PR if you want full-blown tests that include more than 2-cluster scenarios.

Debug tests

If the test suite is failing for you, you may want to try triggering Re-run all jobs (top right) with debug logging enabled. It will also make the print debug action more verbose.

@kuritka kuritka changed the title Unit Tests, race fix Unit Tests: limit warnings, fix racing Jun 11, 2024
@kuritka kuritka force-pushed the tests branch 6 times, most recently from 0800870 to 6121a12 Compare June 13, 2024 15:23
Signed-off-by: Michal Kuritka <kuritka@gmail.com>
Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

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

Great stuff 👍

@ytsarev ytsarev merged commit 12ce2a0 into master Jun 13, 2024
18 checks passed
@ytsarev ytsarev deleted the tests branch June 13, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flaky: yet another non-deterministic tests failure
2 participants