]> git.ipfire.org Git - thirdparty/bind9.git/commit
Implement Python helpers for using RNDC in tests
authorMichał Kępień <michal@isc.org>
Tue, 25 Jul 2023 12:37:05 +0000 (14:37 +0200)
committerŠtěpán Balážik <stepan@isc.org>
Thu, 21 Dec 2023 18:10:15 +0000 (18:10 +0000)
commitc38c29e84dfe90fbad976365e7441eb445750c29
treecc59fd8df9a32acd442b7495ef0f6c694df0e231
parente997a738d69a6244ea53d4c097ac3cbe20e28fca
Implement Python helpers for using RNDC in tests

Controlling named instances using RNDC is a common action in BIND 9
system tests.  However, there is currently no standardized way of doing
that from Python-based system tests, which leads to code duplication.
Add a set of Python classes and pytest fixtures which intend to simplify
and standardize use of RNDC in Python-based system tests.

For now, RNDC commands are sent to servers by invoking the rndc binary.
However, a switch to a native Python module able to send RNDC commands
without executing external binaries is expected to happen soon.  Even
when that happens, though, having the capability to invoke the rndc
binary (in order to test it) will remain useful.  Define a common Python
interface that such "RNDC executors" should implement (RNDCExecutor), in
order to make switching between them convenient.

Co-authored-by: Štěpán Balážik <stepan@isc.org>
bin/tests/system/conftest.py
bin/tests/system/isctest/__init__.py
bin/tests/system/isctest/instance.py [new file with mode: 0644]
bin/tests/system/isctest/rndc.py [new file with mode: 0644]