Unit Tests: limit warnings, fix racing #1597
Merged
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 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.
One of the controller tests asserted two slices that were not sorted. Sometimes it happened that the compared slice was in a different order, so the assert failed. (https://github.com/k8gb-io/k8gb/compare/tests?expand=1#diff-cdaa5d8a2fd5599a082eb3ac57db11e206344930635e6f219e26f98e42d1f61aR584-R585)
Test Dig default DNS (8.8.8.8.8) with fqdn sometimes timeouted. I fixed the timeout error with a test. (https://github.com/k8gb-io/k8gb/compare/tests?expand=1#diff-1b70ee441d18dc0d9e2e0665a5b61a3a3a5846a8ab7fe3aebb1637f8bf9bcf02R50-R53)
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.
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.