mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 19:42:05 -04:00
Set pytestmark explicitly in rollover* and nsec3* tests
Importing pytestmark confuses static analysis tools as they flag it as unused.
This commit is contained in:
parent
ef21b77912
commit
7178c97e5c
26 changed files with 80 additions and 26 deletions
|
|
@ -16,7 +16,7 @@ import pytest
|
|||
|
||||
import isctest
|
||||
|
||||
pytestmark = pytest.mark.extra_artifacts(
|
||||
NSEC3_MARK = pytest.mark.extra_artifacts(
|
||||
[
|
||||
"*.axfr",
|
||||
"*.created",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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 = {}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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(".")
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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*",
|
||||
|
|
|
|||
Loading…
Reference in a new issue