bind9/bin
Michał Kępień f37e0f2cbe Refactor "statschannel" test's helper modules
The "statschannel" system test contains two Python helper modules:

  - generic.py: test functions directly invoked by both tests-json.py
    and test-xml.py,

  - helper.py: helper functions invoked by test functions in generic.py.

The above logic for splitting helper functions into Python modules
prevents selective test skipping from working due to unconditional
import statements being present in both helper modules.  For example, if
dnspython is not available on the test host, tests-json.py imports
generic.py, which in turn imports helper.py, which in turn attempts to
import various dnspython modules, triggering ImportError exceptions
during test initialization.  Various decorators used for some tests
(like @pytest.mark.dnspython) suggest that such a scenario should be
handled gracefully, but that is not the case - modifying the test
collection in conftest.py does not prevent pytest from failing due to
import errors.

Fix by moving helper functions around to achieve a different split:

  - generic.py: helper functions only relying on the Python standard
    library,

  - generic_dnspython.py: helper functions requiring dnspython.

Only two tests in tests-{json,xml}.py need dnspython to work
(test_traffic_json(), test_traffic_xml()).  Since all
dnspython-dependent code is now present in generic_dnspython.py, employ
pytest.importorskip() in those two tests to ensure they can be
selectively skipped when dnspython is not available.  Adjust other code
to account for the revised Python helper module layout.  Remove all
occurrences of the @pytest.mark.dnspython decorator (and all associated
code) from the "statschannel" system test to prevent confusion.

(cherry picked from commit 96b7f9f9aa)
2022-03-14 09:04:10 +01:00
..
check Refer to RFC 4592 for DNS wildcards 2022-03-10 20:18:52 +01:00
confgen Split out ddns-confgen and tsig-keygen man pages 2022-03-10 20:18:52 +01:00
delv Use compile-time paths in the manual pages 2022-02-10 17:08:24 +01:00
dig Remove usage of deprecated ATOMIC_VAR_INIT() macro 2022-03-09 09:25:37 +01:00
dnssec Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
named Make dns_catz_get_iterator() return void 2022-03-08 20:47:06 +01:00
nsupdate Reorder the nsupdate shutdown code to shutdown managers early 2022-03-08 09:50:13 +01:00
plugins Make isc_ht_init() and isc_ht_iter_create() return void 2022-03-08 20:47:06 +01:00
rndc Remove usage of deprecated ATOMIC_VAR_INIT() macro 2022-03-09 09:25:37 +01:00
tests Refactor "statschannel" test's helper modules 2022-03-14 09:04:10 +01:00
tools Fix the remaining cases of <prog>_CFLAGS -> <prog>_CPPFLAGS 2022-03-13 18:53:19 +01:00
Makefile.am Remove native PKCS#11 support 2021-09-09 15:35:39 +02:00