]> 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>
Wed, 25 Feb 2026 12:33:25 +0000 (13:33 +0100)
Importing pytestmark confuses static analysis tools as they flag it as
unused.

(cherry picked from commit 7178c97e5c3aae200e54c3663a1b9216f5f83b03)

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 c34d4dde8f7a23134eec5ffa033f7849fa387c91..edfd00532e6d890f62f40223dd0f06e28dbe9fe4 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 71a865a4b3e05d1f5e47648dca794c69f7bb59ac..ce95260f601a906a0047743805e396234bf89bb8 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 cd5aca5224d0377e76490fb4df0481721b218d6f..0651ecf5adae49ff2fbccc0f1cd4f8f7efca68c8 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 ae610eeae5dd5058da96699afc74c883572b1772..6f0cc1d86873db6696dfa187bef41f779345de13 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 9b6cc5b57273f4e0273229c654243a3dfcd9c806..94e7bee68f55ea48115029e4292c4a62fb89c519 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 4abef13fca59faca26ca5799055481bf9ceff898..3ce4f7ff34c82a6e28c6393a763087a0247f8345 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 c9623a5db2a523ad92e0efa67a465514c4714b2a..16983c5559e48bf015eab9eea526879e9c956a63 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 0ac0e0ec2fb85a243df000e2453669afe9a0efb5..824f6d78fb8fd851e1331c69c452ab2f33f429e9 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 0a326452fd29a6ff6328d8dfe9b14524d8a64b9f..28acd41909ddc871c18f3fc8a12a5088e24d92ed 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 7c66fee13110216820e1a098b58906e87c2d7f90..62c7276ba5ec26f00cd2b76b78488555df36b685 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 a0b4fb1edca7623a9c0b2cf59b74f5251bc9edd0..cfed5a3646c9797ccc3ce40888c58b92f7085ff4 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 a26043769d5cb05ef1adc922b55807aacd887783..fc110ca6738ac9e7b74ef5da5fa100137e71ba75 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 48286739f95652eda64828a90e86dd2f6cd03584..f0a4410e25d05c7f5f7e0e79cf2caac6926d433d 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 48b185261b3b4aca733350f748d4fd51ac30578c..ab947348554bffd5b5dbe6e43efd55cfb08bec1a 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 61e6dbf867f2afcc3d4635320e9cf1ec76fcb47c..0f5d1423f64ea6e71283a5372e7083e8d2231545 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 7f36828e78ffb56bfaa77a9e47cbc260d5c0f2bd..04727620a1cfdd8a31e72526df273360a7d10fc4 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 b33c57c4c420a22b44486b5eea6dfd976a9d0546..d59e005c6d2812c998ff006c3deacad9d13c0152 100644 (file)
@@ -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(".")
index fadebec54e23aa146719d3ac28aaf4b1c8e78a8b..d776b5c9e017db035fff18d9b586e295ab5e6c8b 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 aa4d8ba0d2453e16be9ce6d96107a89f75f99fbd..a3f618b6e691624a264264d913b51b04bea0d7b2 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 49b3fc9313d98f0469c855c7928603c51b624d73..b4e816a260e0e2a1b9bf343285559f7de0096b7a 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*",