2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 21:17:54 +00:00

14 Commits

Author SHA1 Message Date
Nicki Křížek
23e6b49cc5 Indent multiline output in pytest logging
When multiline message is logged, indent all but the first line (which
will be preceeded by the LOG_FORMAT). This improves the clarity of logs,
as it's immediately clear which lines are regular log output, and which
ones are multiline debug output.

Adjust the isctest.run.cmd() stdout/stderr logging to this new format.
2025-06-27 16:31:49 +02:00
Nicki Křížek
069e4ef0f7 Use time.monotonic() for time measumeremts in pytest
For duration measurements, i.e. deadlines and timeouts, it's more
suitable to use monotonic time as it's guaranteed to only go forward,
unlike time.time() which can be affected by local clock settings.
2025-06-19 14:11:28 +02:00
Nicki Křížek
620c884133 Improve logging from isctest.run.retry_with_timeout
Allow use of exception (and by extension, assert statements) in the
called function in order to extract essential debug information about
the type of failure that was encountered.

In case the called function fails to succeed on the last retry and
raised an exception, log it as error and set it as the assert message to
propagate it through the pytest framework.
2025-06-19 14:11:27 +02:00
Michal Nowak
409f394d6e Rewrite keyfromlabel system test to pytest 2025-02-17 19:18:04 +00:00
Michal Nowak
7347abd01f Add Dig interface 2025-02-17 19:16:03 +00:00
Michal Nowak
38e751d9ac
Rename assert_custom_named_is_alive to named_alive 2025-02-13 18:43:47 +01:00
Michal Nowak
7c499d1689
Rewrite nzd2nzf system test to pytest 2025-02-13 18:43:47 +01:00
Nicki Křížek
a24f71bae4 Allow to use an arbitrary numeric identifier for NamedInstance
In some cases, the numeric identifier doesn't correspond to the
directory name (i.e. `resolver` server in `shutdown` test, which is
supposed to be 10.53.0.3). These are typically servers that shouldn't be
auto-started by the runner, thus avoiding the typical `*ns<X>` name.

Support these server by allowing a fallback initialization with custom
numeric identifier in case it can't be parsed from the directory name.
2025-02-04 12:35:38 +00:00
Nicki Křížek
b6d645410c Move shell and perl util functions to isctest.run
Previously, these functions have been provided as fixtures. This was
limiting re-use, because it wasn't possible to call these outside of
tests / other fixtures without passing these utility functions around.
Move them into isctest.run package instead.
2025-02-04 12:35:38 +00:00
Nicki Křížek
7639c58c48 Disable too-many/too-few pylint checks
Enforcing pylint standards and default for our test code seems
counter-productive. Since most of the newly added code are tests or is
test-related, encountering these checks rarely make us refactor the code
in other ways and we just disable these checks individually. Code that
is too complex or convoluted will be pointed out in reviews anyways.
2024-10-17 11:01:44 +02:00
Michal Nowak
8b55d0709d
Extract dns.rcode compatibility code to isctest.compat 2024-09-12 11:42:22 +02:00
Michal Nowak
2cec1de43b
Extract "custom" named instances support to isctest.run module 2024-09-12 11:42:22 +02:00
Tom Krizek
a9f3fb3db5
Add isctest.run.cmd() helper function 2024-05-14 11:45:55 +02:00
Michal Nowak
5694c52f52
Add retry_with_timeout() utility function 2024-02-23 11:04:51 +01:00