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.20.20~5^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af85bc2592de747c1bdbe3ba8e6133f7b6521c50;p=thirdparty%2Fbind9.git Set pytestmark explicitly in rollover* and nsec3* tests Importing pytestmark confuses static analysis tools as they flag it as unused. (cherry picked from commit 7178c97e5c3aae200e54c3663a1b9216f5f83b03) --- diff --git a/bin/tests/system/nsec3/common.py b/bin/tests/system/nsec3/common.py index c34d4dde8f7..edfd00532e6 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 71a865a4b3e..ce95260f601 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 cd5aca5224d..0651ecf5ada 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 ae610eeae5d..6f0cc1d8687 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 9b6cc5b5727..94e7bee68f5 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 4abef13fca5..3ce4f7ff34c 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 c9623a5db2a..16983c5559e 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 0ac0e0ec2fb..824f6d78fb8 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 0a326452fd2..28acd41909d 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 7c66fee1311..62c7276ba5e 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 a0b4fb1edca..cfed5a3646c 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 a26043769d5..fc110ca6738 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 48286739f95..f0a4410e25d 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 48b185261b3..ab947348554 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 61e6dbf867f..0f5d1423f64 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 7f36828e78f..04727620a1c 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 b33c57c4c42..d59e005c6d2 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 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 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 fadebec54e2..d776b5c9e01 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 aa4d8ba0d24..a3f618b6e69 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 49b3fc9313d..b4e816a260e 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*",