Commit Graph

10 Commits

Author SHA1 Message Date
Michal Nowak
aa7087ca9b Replace dns.query module with isctest.query
(cherry picked from commit dfec69b4a2)
2024-10-01 16:33:42 +02:00
Michal Nowak
ec42164265 Use isctest.run.cmd() helper function in tests
(cherry picked from commit 77a42f8875)
2024-05-14 12:54:26 +02:00
Michal Nowak
60c5f6f972 Accommodate black 24.2.0
(cherry picked from commit 70163a8b3f)
2024-02-14 15:45:17 +01:00
Michał Kępień
93b4b110a7 Refactor string matching loop for readability
(cherry picked from commit 831c5d34f9)
2024-01-15 17:14:06 +01:00
Michał Kępień
c56b8136a0 Clean up the "checkds" system test
The "checkds" system test contains a lot of duplicated code despite
carrying out the same set of actions for every tested scenario
(zone_check() → wait for logs to appear → keystate_check()).  Extract
the parts of the code shared between all tests into a new function,
test_checkds(), and use pytest's test parametrization capabilities to
pass distinct sets of test parameters to this new function, in an
attempt to cleanly separate the fixed parts of this system test from the
variable ones.  Replace format() calls with f-strings.

(cherry picked from commit aa31a872d0)
2024-01-13 11:31:51 +01:00
Michał Kępień
ab058db54c Drop use of dns.resolver.Resolver from "checkds"
The "checkds" system test only uses dns.resolver.Resolver objects to
access their 'nameservers' and 'port' attributes.  Instances of the
NamedInstance class also expose that information via their attributes,
so only pass NamedInstance objects around instead of needlessly
depending on dns.resolver.Resolver.

(cherry picked from commit cf338a7ca3)
2024-01-13 11:31:51 +01:00
Michał Kępień
2d297fc8b3 Use helper Python classes for watching log files
Make log file watching in Python-based system tests consistent by
employing the helper Python classes designed for that purpose.  Drop the
custom code currently used.

(cherry picked from commit 2c35b839a5)
2024-01-13 11:31:51 +01:00
Tom Krizek
7a42a6b409 Skip checkds test on Python<3.7
checkds test requires the capture_output argument for subprocess.run()
which was added in Python 3.7.

(cherry picked from commit 0361233b3d)
2023-08-23 14:50:22 +02:00
Matthijs Mekking
7ce0f7fb9e Add checkds test case with resolver parental-agent
Add a test case for a server that uses a resolver as an parental-agent.

We need two root servers, ns1 and ns10, one that delegates to the
'checkds' tld with the DS published (ns2), and one that delegates to
the 'checkds' tld with the DS removed (ns5). Both root zones are
being setup in the 'ns1/setup.sh' script.

We also need two resolvers, ns3 and ns8, that use different root hints
(one uses ns1 address as a hint, the other uses ns10).

Then add the checks to test_checkds.py is similar to the existing tests.

Update 'types' because for zones that have the DS withdrawn (or to be
withdrawn), the CDS and CDNSKEY records should not be published and
thus should not be in the NSEC bitmap.

(cherry picked from commit 0b9a9f9955)
2023-01-19 16:56:22 +01:00
Tom Krizek
4652da6caf Use common name convention for pytest files
It is better to use consistent file names to avoid issue with sorting
etc.

Using underscore in filenames as opposed to dash was chosen because it
seems more common in pytest/python to use underscore for filenames.

Also rename the bin/tests/system/timeouts/tests-tcp.py file to
bin/tests/system/timeouts/tests_tcp_timeouts.py to avoid pytest name
collision (there can't be two files named tests_tcp.py).

(cherry picked from commit f6409ee6ac)
2022-12-21 14:02:45 +01:00