Disable automatic DNS tests on *_nses.yml unless tests run with SD_TEST_NS_DNS=1#15226
Open
talflon wants to merge 1 commit into
Open
Disable automatic DNS tests on *_nses.yml unless tests run with SD_TEST_NS_DNS=1#15226talflon wants to merge 1 commit into
talflon wants to merge 1 commit into
Conversation
- With the current code, failures on these tests don't cause improper operation of the spam checks: nothing would crash, and there'd only be extra FPs if a NS domain was bought by a new, innocent party. We can always disable the domain when the FPs appear. - test_yaml_nses_validate() renamed to test_yaml_nses_validate_dns(), and isn't run unless env var SD_TEST_NS_DNS=1 - new test_yaml_nses_validate_quick() does only non-DNS checks of the entries
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
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.
When a domain listed (and not disabled) in blacklisted_nses.yml or watched_nses.yml expires or is misconfigured, we get a lot of spam of failing tests in CHQ, because
tests/test_blacklists.py::test_yaml_nses_validatedoes DNS lookups for these.But with the current code, these DNS failures don't cause improper operation of the spam checks: nothing would crash, and there'd only be extra FPs if a NS domain was bought by a new, innocent party. We can always disable a domain if and when FPs appear.
This PR disables the DNS lookups when tests are run under normal settings, continues to test for malformed entries in the YML files, and allows doing the full test by setting the environment variable
SD_TEST_NS_DNS=1. This means:Changes made to accomplish this:
test_yaml_nses_validate()renamed totest_yaml_nses_validate_dns(), and isn't run unless env varSD_TEST_NS_DNS=1test_yaml_nses_validate_quick()does only non-DNS checks of the entries