From: Štěpán Balážik Date: Thu, 5 Feb 2026 12:24:46 +0000 (+0100) Subject: Set pytestmark explicitly in rollover* and nsec3* tests X-Git-Tag: v9.21.19~15^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7178c97e5c3aae200e54c3663a1b9216f5f83b03;p=thirdparty%2Fbind9.git Set pytestmark explicitly in rollover* and nsec3* tests Importing pytestmark confuses static analysis tools as they flag it as unused. --- diff --git a/bin/tests/system/nsec3/common.py b/bin/tests/system/nsec3/common.py index 31c7ecd66a2..542af0e622e 100644 --- a/bin/tests/system/nsec3/common.py +++ b/bin/tests/system/nsec3/common.py @@ -16,7 +16,7 @@ import pytest import isctest -pytestmark = pytest.mark.extra_artifacts( +NSEC3_MARK = pytest.mark.extra_artifacts( [ "*.axfr", "*.created", diff --git a/bin/tests/system/nsec3/tests_nsec3_change.py b/bin/tests/system/nsec3/tests_nsec3_change.py index 4d01eb70d05..195925092a2 100644 --- a/bin/tests/system/nsec3/tests_nsec3_change.py +++ b/bin/tests/system/nsec3/tests_nsec3_change.py @@ -20,11 +20,13 @@ import dns.update import pytest from isctest.vars.algorithms import RSASHA1, Algorithm -from nsec3.common import check_nsec3_case, default_config, pytestmark +from nsec3.common import NSEC3_MARK, check_nsec3_case, default_config import isctest import isctest.mark +pytestmark = NSEC3_MARK + # include the following zones when rendering named configs ZONES = { "nsec3-change.kasp", diff --git a/bin/tests/system/nsec3/tests_nsec3_initial.py b/bin/tests/system/nsec3/tests_nsec3_initial.py index 8148a16fd3f..91f81eac15e 100644 --- a/bin/tests/system/nsec3/tests_nsec3_initial.py +++ b/bin/tests/system/nsec3/tests_nsec3_initial.py @@ -18,11 +18,13 @@ import dns.update import pytest from isctest.vars.algorithms import RSASHA1, Algorithm -from nsec3.common import check_nsec3_case, default_config, pytestmark +from nsec3.common import NSEC3_MARK, check_nsec3_case, default_config import isctest import isctest.mark +pytestmark = NSEC3_MARK + # include the following zones when rendering named configs ZONES = { "nsec-to-nsec3.kasp", diff --git a/bin/tests/system/nsec3/tests_nsec3_reconfig.py b/bin/tests/system/nsec3/tests_nsec3_reconfig.py index 6c8c16b29cd..6cf85d65667 100644 --- a/bin/tests/system/nsec3/tests_nsec3_reconfig.py +++ b/bin/tests/system/nsec3/tests_nsec3_reconfig.py @@ -20,11 +20,13 @@ import dns.update import pytest from isctest.vars.algorithms import RSASHA1, Algorithm -from nsec3.common import check_nsec3_case, default_config, pytestmark +from nsec3.common import NSEC3_MARK, check_nsec3_case, default_config import isctest import isctest.mark +pytestmark = NSEC3_MARK + # include the following zones when rendering named configs ZONES = { "nsec3-to-nsec.kasp", diff --git a/bin/tests/system/nsec3/tests_nsec3_reload.py b/bin/tests/system/nsec3/tests_nsec3_reload.py index f1d1f996659..bd720c87f15 100644 --- a/bin/tests/system/nsec3/tests_nsec3_reload.py +++ b/bin/tests/system/nsec3/tests_nsec3_reload.py @@ -18,10 +18,12 @@ import time import dns import pytest -from nsec3.common import check_nsec3_case +from nsec3.common import NSEC3_MARK, check_nsec3_case import isctest +pytestmark = NSEC3_MARK + # include the following zones when rendering named configs ZONES = { "nsec3-fails-to-load.kasp", diff --git a/bin/tests/system/nsec3/tests_nsec3_restart.py b/bin/tests/system/nsec3/tests_nsec3_restart.py index e74ea64780f..85913c34e05 100644 --- a/bin/tests/system/nsec3/tests_nsec3_restart.py +++ b/bin/tests/system/nsec3/tests_nsec3_restart.py @@ -18,11 +18,13 @@ import dns.update import pytest from isctest.vars.algorithms import Algorithm -from nsec3.common import check_nsec3_case, check_nsec3param, default_config, pytestmark +from nsec3.common import NSEC3_MARK, check_nsec3_case, check_nsec3param, default_config import isctest import isctest.mark +pytestmark = NSEC3_MARK + # include the following zones when rendering named configs ZONES = { "nsec3.kasp", diff --git a/bin/tests/system/nsec3/tests_nsec3_retransfer.py b/bin/tests/system/nsec3/tests_nsec3_retransfer.py index 586047c1154..d58f127dd4e 100644 --- a/bin/tests/system/nsec3/tests_nsec3_retransfer.py +++ b/bin/tests/system/nsec3/tests_nsec3_retransfer.py @@ -21,11 +21,13 @@ import dns.update import pytest from isctest.vars.algorithms import RSASHA256 -from nsec3.common import check_auth_nsec3, check_nsec3param, pytestmark +from nsec3.common import NSEC3_MARK, check_auth_nsec3, check_nsec3param import isctest import isctest.mark +pytestmark = NSEC3_MARK + DNSKEY_TTL = int(timedelta(hours=1).total_seconds()) ZSK_LIFETIME = int(timedelta(days=90).total_seconds()) diff --git a/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_initial.py b/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_initial.py index c04ffe599c8..eaa66038ddf 100644 --- a/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_initial.py +++ b/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_initial.py @@ -14,11 +14,13 @@ import pytest from isctest.util import param -from rollover.common import ALGOROLL_CONFIG, CDSS, DURATION, TIMEDELTA, pytestmark +from rollover.common import ALGOROLL_CONFIG, CDSS, DURATION, ROLLOVER_MARK, TIMEDELTA from rollover.setup import configure_algo_csk, configure_root, configure_tld import isctest +pytestmark = ROLLOVER_MARK + POLICY = "csk-algoroll" diff --git a/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_reconfig.py b/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_reconfig.py index 8bfd4a3083f..afaf9df64a8 100644 --- a/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_reconfig.py +++ b/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_reconfig.py @@ -26,13 +26,15 @@ from rollover.common import ( ALGOROLL_OFFVAL, CDSS, DURATION, + ROLLOVER_MARK, TIMEDELTA, - pytestmark, ) from rollover.setup import configure_algo_csk, configure_root, configure_tld import isctest +pytestmark = ROLLOVER_MARK + CONFIG = ALGOROLL_CONFIG POLICY = "csk-algoroll" TIME_PASSED = 0 # set in reconfigure() fixture diff --git a/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_initial.py b/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_initial.py index 51168a87a58..f973e3f7f6a 100644 --- a/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_initial.py +++ b/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_initial.py @@ -14,11 +14,13 @@ import pytest from isctest.util import param -from rollover.common import ALGOROLL_CONFIG, CDSS, DURATION, TIMEDELTA, pytestmark +from rollover.common import ALGOROLL_CONFIG, CDSS, DURATION, ROLLOVER_MARK, TIMEDELTA from rollover.setup import configure_algo_ksk_zsk, configure_root, configure_tld import isctest +pytestmark = ROLLOVER_MARK + def bootstrap(): data = { diff --git a/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_reconfig.py b/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_reconfig.py index a9f310fccb0..ffeb539f2fb 100644 --- a/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_reconfig.py +++ b/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_reconfig.py @@ -26,13 +26,15 @@ from rollover.common import ( ALGOROLL_OFFVAL, CDSS, DURATION, + ROLLOVER_MARK, TIMEDELTA, - pytestmark, ) from rollover.setup import configure_algo_ksk_zsk, configure_root, configure_tld import isctest +pytestmark = ROLLOVER_MARK + CONFIG = ALGOROLL_CONFIG POLICY = "ecdsa256" TIME_PASSED = 0 # set in reconfigure() fixture diff --git a/bin/tests/system/rollover-csk-roll1/tests_rollover_csk_roll1.py b/bin/tests/system/rollover-csk-roll1/tests_rollover_csk_roll1.py index ce1f94f2e5e..70a661abc7d 100644 --- a/bin/tests/system/rollover-csk-roll1/tests_rollover_csk_roll1.py +++ b/bin/tests/system/rollover-csk-roll1/tests_rollover_csk_roll1.py @@ -17,11 +17,13 @@ import pytest from isctest.kasp import Ipub, Iret from isctest.util import param -from rollover.common import TIMEDELTA, pytestmark +from rollover.common import ROLLOVER_MARK, TIMEDELTA from rollover.setup import configure_cskroll1, configure_root, configure_tld import isctest +pytestmark = ROLLOVER_MARK + CDSS = ["CDNSKEY", "CDS (SHA-384)"] CONFIG = { "dnskey-ttl": TIMEDELTA["PT1H"], diff --git a/bin/tests/system/rollover-csk-roll2/tests_rollover_csk_roll2.py b/bin/tests/system/rollover-csk-roll2/tests_rollover_csk_roll2.py index b63c59b35dd..3e665c44919 100644 --- a/bin/tests/system/rollover-csk-roll2/tests_rollover_csk_roll2.py +++ b/bin/tests/system/rollover-csk-roll2/tests_rollover_csk_roll2.py @@ -17,11 +17,13 @@ import pytest from isctest.kasp import Ipub, Iret from isctest.util import param -from rollover.common import TIMEDELTA, pytestmark +from rollover.common import ROLLOVER_MARK, TIMEDELTA from rollover.setup import configure_cskroll2, configure_root, configure_tld import isctest +pytestmark = ROLLOVER_MARK + CDSS = ["CDNSKEY", "CDS (SHA-256)", "CDS (SHA-384)"] CONFIG = { "dnskey-ttl": TIMEDELTA["PT1H"], diff --git a/bin/tests/system/rollover-dynamic2inline/tests_rollover_dynamic2inline.py b/bin/tests/system/rollover-dynamic2inline/tests_rollover_dynamic2inline.py index 925b0b0b1cb..9350fe6035a 100644 --- a/bin/tests/system/rollover-dynamic2inline/tests_rollover_dynamic2inline.py +++ b/bin/tests/system/rollover-dynamic2inline/tests_rollover_dynamic2inline.py @@ -11,10 +11,12 @@ # pylint: disable=redefined-outer-name,unused-import -from rollover.common import CDSS, DEFAULT_CONFIG, pytestmark +from rollover.common import CDSS, DEFAULT_CONFIG, ROLLOVER_MARK import isctest +pytestmark = ROLLOVER_MARK + def test_dynamic2inline(ns3, default_algorithm, templates): config = DEFAULT_CONFIG diff --git a/bin/tests/system/rollover-enable-dnssec/tests_rollover_enable_dnssec.py b/bin/tests/system/rollover-enable-dnssec/tests_rollover_enable_dnssec.py index c6a616b6c44..cd1ef62e9e1 100644 --- a/bin/tests/system/rollover-enable-dnssec/tests_rollover_enable_dnssec.py +++ b/bin/tests/system/rollover-enable-dnssec/tests_rollover_enable_dnssec.py @@ -15,11 +15,13 @@ import pytest from isctest.kasp import Ipub, IpubC, Iret from isctest.util import param -from rollover.common import CDSS, TIMEDELTA, pytestmark +from rollover.common import CDSS, ROLLOVER_MARK, TIMEDELTA from rollover.setup import configure_enable_dnssec, configure_root, configure_tld import isctest +pytestmark = ROLLOVER_MARK + CONFIG = { "dnskey-ttl": TIMEDELTA["PT5M"], "ds-ttl": TIMEDELTA["PT2H"], diff --git a/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_initial.py b/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_initial.py index 9e697156a66..ee4208b08f7 100644 --- a/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_initial.py +++ b/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_initial.py @@ -13,11 +13,13 @@ import pytest -from rollover.common import CDSS, DURATION, UNSIGNING_CONFIG, pytestmark +from rollover.common import CDSS, DURATION, ROLLOVER_MARK, UNSIGNING_CONFIG from rollover.setup import configure_going_insecure, configure_root, configure_tld import isctest +pytestmark = ROLLOVER_MARK + def bootstrap(): data = { diff --git a/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_reconfig.py b/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_reconfig.py index 9abff654fd7..4ea02c8654f 100644 --- a/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_reconfig.py +++ b/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_reconfig.py @@ -13,11 +13,19 @@ import pytest -from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, UNSIGNING_CONFIG, pytestmark +from rollover.common import ( + CDSS, + DEFAULT_CONFIG, + DURATION, + ROLLOVER_MARK, + UNSIGNING_CONFIG, +) from rollover.setup import configure_going_insecure, configure_root, configure_tld import isctest +pytestmark = ROLLOVER_MARK + def bootstrap(): data = { diff --git a/bin/tests/system/rollover-ksk-3crowd/tests_rollover_three_is_a_crowd.py b/bin/tests/system/rollover-ksk-3crowd/tests_rollover_three_is_a_crowd.py index a7580640911..3c0fe98cd75 100644 --- a/bin/tests/system/rollover-ksk-3crowd/tests_rollover_three_is_a_crowd.py +++ b/bin/tests/system/rollover-ksk-3crowd/tests_rollover_three_is_a_crowd.py @@ -19,12 +19,14 @@ from rollover.common import ( KSK_IPUB, KSK_IRET, KSK_LIFETIME_POLICY, - pytestmark, + ROLLOVER_MARK, ) from rollover.setup import configure_ksk_3crowd, configure_root, configure_tld import isctest +pytestmark = ROLLOVER_MARK + CDSS = ["CDS (SHA-256)"] POLICY = "ksk-doubleksk-autosign" OFFSET1 = -int(timedelta(days=60).total_seconds()) diff --git a/bin/tests/system/rollover-ksk-doubleksk/tests_rollover_ksk_doubleksk.py b/bin/tests/system/rollover-ksk-doubleksk/tests_rollover_ksk_doubleksk.py index 5c4e58c2086..d0e750fc963 100644 --- a/bin/tests/system/rollover-ksk-doubleksk/tests_rollover_ksk_doubleksk.py +++ b/bin/tests/system/rollover-ksk-doubleksk/tests_rollover_ksk_doubleksk.py @@ -24,13 +24,15 @@ from rollover.common import ( KSK_KEYTTLPROP, KSK_LIFETIME, KSK_LIFETIME_POLICY, + ROLLOVER_MARK, TIMEDELTA, - pytestmark, ) from rollover.setup import configure_ksk_doubleksk, configure_root, configure_tld import isctest +pytestmark = ROLLOVER_MARK + CDSS = ["CDS (SHA-256)"] POLICY = "ksk-doubleksk" OFFSETS = {} diff --git a/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_initial.py b/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_initial.py index f37cb3690f0..9675f0618dc 100644 --- a/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_initial.py +++ b/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_initial.py @@ -14,10 +14,12 @@ import pytest from isctest.util import param -from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, pytestmark +from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, ROLLOVER_MARK import isctest +pytestmark = ROLLOVER_MARK + @pytest.mark.parametrize( "zone, policy, lifetime", diff --git a/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_reconfig.py b/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_reconfig.py index 345bd2bc65a..aff6c11619f 100644 --- a/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_reconfig.py +++ b/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_reconfig.py @@ -14,10 +14,12 @@ import pytest from isctest.util import param -from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, pytestmark +from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, ROLLOVER_MARK import isctest +pytestmark = ROLLOVER_MARK + @pytest.fixture(scope="module", autouse=True) def after_servers_start(ns3, templates): diff --git a/bin/tests/system/rollover-multisigner/tests_rollover_multisigner.py b/bin/tests/system/rollover-multisigner/tests_rollover_multisigner.py index 20e3c357fef..f4f616cb28f 100644 --- a/bin/tests/system/rollover-multisigner/tests_rollover_multisigner.py +++ b/bin/tests/system/rollover-multisigner/tests_rollover_multisigner.py @@ -21,11 +21,13 @@ import pytest from isctest.kasp import Iret, SettimeOptions from isctest.run import EnvCmd -from rollover.common import pytestmark +from rollover.common import ROLLOVER_MARK from rollover.setup import fake_lifetime, render_and_sign_zone, setkeytimes import isctest +pytestmark = ROLLOVER_MARK + def bootstrap(): templates = isctest.template.TemplateEngine(".") diff --git a/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_initial.py b/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_initial.py index b6f718c26bf..ab8ffd372cc 100644 --- a/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_initial.py +++ b/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_initial.py @@ -13,11 +13,13 @@ import pytest -from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, pytestmark +from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, ROLLOVER_MARK from rollover.setup import configure_root, configure_straight2none, configure_tld import isctest +pytestmark = ROLLOVER_MARK + def bootstrap(): data = { diff --git a/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_reconfig.py b/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_reconfig.py index 5af41f47c99..90ba61af2bd 100644 --- a/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_reconfig.py +++ b/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_reconfig.py @@ -13,11 +13,13 @@ import pytest -from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, pytestmark +from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, ROLLOVER_MARK from rollover.setup import configure_root, configure_straight2none, configure_tld import isctest +pytestmark = ROLLOVER_MARK + def bootstrap(): data = { diff --git a/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py b/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py index 96db40c4cb7..f87827dd21d 100644 --- a/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py +++ b/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py @@ -17,11 +17,13 @@ import pytest from isctest.kasp import Ipub, Iret from isctest.util import param -from rollover.common import TIMEDELTA, pytestmark +from rollover.common import ROLLOVER_MARK, TIMEDELTA from rollover.setup import configure_root, configure_tld, configure_zsk_prepub import isctest +pytestmark = ROLLOVER_MARK + CONFIG = { "dnskey-ttl": TIMEDELTA["PT1H"], "ds-ttl": TIMEDELTA["P1D"], diff --git a/bin/tests/system/rollover/common.py b/bin/tests/system/rollover/common.py index 7674537f16d..0b0eedf0eb0 100644 --- a/bin/tests/system/rollover/common.py +++ b/bin/tests/system/rollover/common.py @@ -15,7 +15,7 @@ import pytest from isctest.kasp import Ipub, IpubC, Iret -pytestmark = pytest.mark.extra_artifacts( +ROLLOVER_MARK = pytest.mark.extra_artifacts( [ "*.axfr*", "dig.out*",