]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Set pytestmark explicitly in rollover* and nsec3* tests
authorŠtěpán Balážik <stepan@isc.org>
Thu, 5 Feb 2026 12:24:46 +0000 (13:24 +0100)
committerŠtěpán Balážik <stepan@isc.org>
Fri, 20 Feb 2026 14:17:32 +0000 (15:17 +0100)
Importing pytestmark confuses static analysis tools as they flag it as
unused.

26 files changed:
bin/tests/system/nsec3/common.py
bin/tests/system/nsec3/tests_nsec3_change.py
bin/tests/system/nsec3/tests_nsec3_initial.py
bin/tests/system/nsec3/tests_nsec3_reconfig.py
bin/tests/system/nsec3/tests_nsec3_reload.py
bin/tests/system/nsec3/tests_nsec3_restart.py
bin/tests/system/nsec3/tests_nsec3_retransfer.py
bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_initial.py
bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_reconfig.py
bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_initial.py
bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_reconfig.py
bin/tests/system/rollover-csk-roll1/tests_rollover_csk_roll1.py
bin/tests/system/rollover-csk-roll2/tests_rollover_csk_roll2.py
bin/tests/system/rollover-dynamic2inline/tests_rollover_dynamic2inline.py
bin/tests/system/rollover-enable-dnssec/tests_rollover_enable_dnssec.py
bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_initial.py
bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_reconfig.py
bin/tests/system/rollover-ksk-3crowd/tests_rollover_three_is_a_crowd.py
bin/tests/system/rollover-ksk-doubleksk/tests_rollover_ksk_doubleksk.py
bin/tests/system/rollover-lifetime/tests_rollover_lifetime_initial.py
bin/tests/system/rollover-lifetime/tests_rollover_lifetime_reconfig.py
bin/tests/system/rollover-multisigner/tests_rollover_multisigner.py
bin/tests/system/rollover-straight2none/tests_rollover_straight2none_initial.py
bin/tests/system/rollover-straight2none/tests_rollover_straight2none_reconfig.py
bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py
bin/tests/system/rollover/common.py

index 31c7ecd66a23f84291b204996b4de4c63b66de7e..542af0e622e94384c37901c1349c6f02a534c4fe 100644 (file)
@@ -16,7 +16,7 @@ import pytest
 
 import isctest
 
-pytestmark = pytest.mark.extra_artifacts(
+NSEC3_MARK = pytest.mark.extra_artifacts(
     [
         "*.axfr",
         "*.created",
index 4d01eb70d05f5a5652bbf8a12b00dc802ee5b270..195925092a27c8e3ca1a704654fb52b9ee0fb33d 100644 (file)
@@ -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",
index 8148a16fd3ff326b7e31b7ebbe6ddafff6d01ef0..91f81eac15e9f340a506a2f23f6ccfcca82eb881 100644 (file)
@@ -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",
index 6c8c16b29cd87ef7a024ebefef509288dffebe31..6cf85d65667e408024556ef8ee5e6f184ac4427d 100644 (file)
@@ -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",
index f1d1f99665967f9879f6439114bcbe3bf2226a4c..bd720c87f15bbab4945d3601bc98b2ba93acccd8 100644 (file)
@@ -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",
index e74ea64780fa5f3ba524761347a569cd10e53991..85913c34e05a26989ecbf36f4567226ba23dd5e5 100644 (file)
@@ -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",
index 586047c1154b51062cefa3b33fcd303f474eae0d..d58f127dd4e800be991e1463b490ebaecb1f8d58 100644 (file)
@@ -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())
 
index c04ffe599c81245efb899ba177bc38659ebb96ab..eaa66038ddf031e72418eada2c3a8b30fe9ced83 100644 (file)
 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"
 
 
index 8bfd4a3083feabaf15fd781150439c3adb279d01..afaf9df64a80af629146202a3b20394cc633bf1b 100644 (file)
@@ -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
index 51168a87a5838055006e840ab2babc29ea4aad53..f973e3f7f6a4b2a3bfaac8648fb75ff0dc7b1c09 100644 (file)
 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 = {
index a9f310fccb00c640c0ffecaa5e2198ad7c04aed4..ffeb539f2fbf3b4d817a1aaf79ab12335f30ac8a 100644 (file)
@@ -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
index ce1f94f2e5ebe73344ae9078fa2fe9189f58077d..70a661abc7db9c120333980d362a9f26b8f9a0e9 100644 (file)
@@ -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"],
index b63c59b35ddb56eb712cfaee5786406d035d53e2..3e665c44919a54c0cb9c98e0ade2a5cbdce234be 100644 (file)
@@ -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"],
index 925b0b0b1cb70eaa8097a36e57474413c9c0252a..9350fe6035a87a56727f51187629dd2082d6b45c 100644 (file)
 
 # 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
index c6a616b6c4432e95f8bfd99e916f5e1bb319db50..cd1ef62e9e16254b5b2316b91fbf7efdf508d160 100644 (file)
@@ -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"],
index 9e697156a66ad286206574d9338acac86c0bcb11..ee4208b08f7368344b66dc4b812ee240a21b21ed 100644 (file)
 
 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 = {
index 9abff654fd7db561e6c5b200b2f403d699ca83e3..4ea02c8654fefdafd1ee12b00b85cc7e46d79b3d 100644 (file)
 
 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 = {
index a7580640911f1247a5bc280dcedbaecc314f40fd..3c0fe98cd752c135b7867913a46b4cd3949ead0f 100644 (file)
@@ -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())
index 5c4e58c2086246610af6d2645950e2a215b23b51..d0e750fc9632241893d587b97081bc76cb090aa4 100644 (file)
@@ -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 = {}
index f37cb3690f0c1c1d2da6c4de8fe2a2aca5fe27d9..9675f0618dc635564d25c8f084a10f3663b2e76a 100644 (file)
 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",
index 345bd2bc65aec1a5933814eeb59c3c3ccfa9b55d..aff6c11619fda4c61617426cc2c7b7d370201f00 100644 (file)
 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):
index 20e3c357fef09ad8588e3cde1aed2a9dbcc314d3..f4f616cb28f421f0b444f6227fe351861e8b1753 100644 (file)
@@ -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(".")
index b6f718c26bf2d085be09e77d49fecb14012a919f..ab8ffd372ccc603a2f147b5e8e0a815d4738b017 100644 (file)
 
 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 = {
index 5af41f47c9982a1b477493d03f932e34b0486f98..90ba61af2bd3ba081261e2a63c85fdcf8fb2718d 100644 (file)
 
 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 = {
index 96db40c4cb7d5d5e48a9f85ec37e69aab42a011a..f87827dd21d773decc532fa5a40c857acc10126a 100644 (file)
@@ -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"],
index 7674537f16d79416f6ec55feb214f2aeb7807cfd..0b0eedf0eb0796e4564244b10946cff5cc0887ed 100644 (file)
@@ -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*",