]> git.ipfire.org Git - thirdparty/bind9.git/commit
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)
commitcf77bfacce0548b94b9a6c67eea3271158728f76
treee2056b00e6ded4cf4f86a9ec50886a3ef6556856
parent748812df0848b7e76e35b0b8bd02ac83c18ce647
parentd737986ea24bdcb344a91a491816766b80120c15
chg: test: Improve WatchLog API for pytest

- 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