]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
chg: test: Improve WatchLog API for pytest
authorNicki Křížek <nicki@isc.org>
Fri, 18 Jul 2025 10:13:12 +0000 (12:13 +0200)
committerNicki Křížek <nicki@isc.org>
Fri, 18 Jul 2025 10:13:12 +0000 (12:13 +0200)
- Refactor and extend the `WatchLog.wait_for_line()` API:
    1. To allow for usage of one or more FlexPatterns, i.e. either plain
       strings to be matched verbatim, or regular expressions. Both can be
       used interchangeably to provide the caller to write simple and
       readable test code, while allowing for increased complexity to allow
       special cases.
    2. Always return the regex match, which allows the caller to identify
       which line was matched, as well as to extract any additional
       information, such as individual regex groups.
- Add `WatchLog.wait_for_sequence()` and `WatchLog.wait_for_all()` helper functions

Merge branch 'nicki/watchlog-improvements' into 'main'

See merge request isc-projects/bind9!10618


Trivial merge