]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fold rollover_algo_csk test into rollover
authorEvan Hunt <each@isc.org>
Fri, 7 Aug 2026 02:03:37 +0000 (19:03 -0700)
committerEvan Hunt <each@isc.org>
Wed, 12 Aug 2026 16:37:55 +0000 (16:37 +0000)
"rollover" and related tests share a lot of common files. they
could be a single system test directory with modules using config
files rendered by jinja2.

this commit merges the "rollover_algo_csk" test into "rollover".

14 files changed:
bin/tests/system/rollover/ns3/named-algo-csk.conf.j2 [moved from bin/tests/system/rollover_algo_csk/ns3/named.conf.j2 with 92% similarity]
bin/tests/system/rollover/ns3/named-rollover.conf.j2 [new file with mode: 0644]
bin/tests/system/rollover/ns3/named.conf.j2
bin/tests/system/rollover/ns3/policy/csk1.conf [moved from bin/tests/system/rollover_algo_csk/ns3/csk1.conf with 100% similarity]
bin/tests/system/rollover/ns3/policy/csk2.conf [moved from bin/tests/system/rollover_algo_csk/ns3/csk2.conf with 100% similarity]
bin/tests/system/rollover/setup.py
bin/tests/system/rollover/tests_rollover_algo_csk_initial.py [moved from bin/tests/system/rollover_algo_csk/tests_rollover_algo_csk_initial.py with 98% similarity]
bin/tests/system/rollover/tests_rollover_algo_csk_reconfig.py [moved from bin/tests/system/rollover_algo_csk/tests_rollover_algo_csk_reconfig.py with 99% similarity]
bin/tests/system/rollover/tests_rollover_manual.py
bin/tests/system/rollover_algo_csk/ns1 [deleted symlink]
bin/tests/system/rollover_algo_csk/ns2 [deleted symlink]
bin/tests/system/rollover_algo_csk/ns3/named.common.conf.j2 [deleted symlink]
bin/tests/system/rollover_algo_csk/ns3/template.db.j2.manual [deleted symlink]
bin/tests/system/rollover_algo_csk/ns3/trusted.conf.j2 [deleted symlink]

similarity index 92%
rename from bin/tests/system/rollover_algo_csk/ns3/named.conf.j2
rename to bin/tests/system/rollover/ns3/named-algo-csk.conf.j2
index 0ab2d22439a062c473b92790ae910e41b165c03c..6042c09878572ca6eceb6da039839293b1ba42c5 100644 (file)
@@ -1,5 +1,5 @@
 {% set csk_roll = csk_roll | default(False) %}
-{% set _csk_file = "csk1.conf" if not csk_roll else "csk2.conf" %}
+{% set _csk_file = "policy/csk1.conf" if not csk_roll else "policy/csk2.conf" %}
 {% set zones = ["kasp", "manual"] %}
 
 include "@_csk_file@";
diff --git a/bin/tests/system/rollover/ns3/named-rollover.conf.j2 b/bin/tests/system/rollover/ns3/named-rollover.conf.j2
new file mode 100644 (file)
index 0000000..ef7b308
--- /dev/null
@@ -0,0 +1,12 @@
+include "kasp.conf";
+include "named.common.conf";
+
+{% for zone in ['manual-rollover.kasp', 'manual-rollover-zrrsig-rumoured.kasp'] %}
+zone "@zone@" {
+       type primary;
+       file "@zone@.db";
+       dnssec-policy "manual-rollover";
+       notify no;
+};
+
+{% endfor %}
index ef7b30883cb22a6fe5a98d0bc9bd4bce01645f55..27598c4c7c15a68abff0ed217167f55342582c97 100644 (file)
@@ -1,12 +1 @@
-include "kasp.conf";
-include "named.common.conf";
-
-{% for zone in ['manual-rollover.kasp', 'manual-rollover-zrrsig-rumoured.kasp'] %}
-zone "@zone@" {
-       type primary;
-       file "@zone@.db";
-       dnssec-policy "manual-rollover";
-       notify no;
-};
-
-{% endfor %}
+include "named-@testconf@.conf";
index 97bed7e1e8844399aece1eb127272fe872546244..ddf07b2df487d9c48e3de4876e774a7f2c38ef08 100644 (file)
@@ -158,7 +158,9 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo
     TsbmN = "now-161h"
     csktimes = f"-P {TactN} -A {TactN}"
     # Key generation.
-    csk_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip()
+    csk_name = keygen(
+        f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3"
+    ).out.strip()
     # Key state timing metadata.
     timings = SettimeOptions(
         g="OMNIPRESENT",
@@ -182,8 +184,12 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo
         csktimes = f"-P {TactN} -A {TactN} -P sync {TsbmN} -I now"
         newtimes = f"-P {TpubN1} -A {TpubN1}"
         # Key generation.
-        csk1_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip()
-        csk2_name = keygen(f"-l csk2.conf {newtimes} {zonename}", cwd="ns3").out.strip()
+        csk1_name = keygen(
+            f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3"
+        ).out.strip()
+        csk2_name = keygen(
+            f"-l policy/csk2.conf {newtimes} {zonename}", cwd="ns3"
+        ).out.strip()
         # Key state timing metadata.
         timings = SettimeOptions(
             g="HIDDEN",
@@ -215,8 +221,12 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo
         csktimes = f"-P {TactN} -A {TactN}  -P sync {TsbmN} -I {TsbmN1}"
         newtimes = f"-P {TpubN1} -A {TpubN1} -P sync {TsbmN1}"
         # Key generation.
-        csk1_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip()
-        csk2_name = keygen(f"-l csk2.conf {newtimes} {zonename}", cwd="ns3").out.strip()
+        csk1_name = keygen(
+            f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3"
+        ).out.strip()
+        csk2_name = keygen(
+            f"-l policy/csk2.conf {newtimes} {zonename}", cwd="ns3"
+        ).out.strip()
         # Key state timing metadata.
         timings = SettimeOptions(
             g="HIDDEN",
@@ -248,8 +258,12 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo
         csktimes = f"-P {TactN} -A {TactN}  -P sync {TsbmN} -I {TsbmN1}"
         newtimes = f"-P {TpubN1} -A {TpubN1} -P sync {TsbmN1}"
         # Key generation.
-        csk1_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip()
-        csk2_name = keygen(f"-l csk2.conf {newtimes} {zonename}", cwd="ns3").out.strip()
+        csk1_name = keygen(
+            f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3"
+        ).out.strip()
+        csk2_name = keygen(
+            f"-l policy/csk2.conf {newtimes} {zonename}", cwd="ns3"
+        ).out.strip()
         # Key state timing metadata.
         timings = SettimeOptions(
             g="HIDDEN",
@@ -283,8 +297,12 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo
         csktimes = f"-P {TactN} -A {TactN} -P sync {TsbmN} -I {TsbmN1}"
         newtimes = f"-P {TpubN1} -A {TpubN1} -P sync {TsbmN1}"
         # Key generation.
-        csk1_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip()
-        csk2_name = keygen(f"-l csk2.conf {newtimes} {zonename}", cwd="ns3").out.strip()
+        csk1_name = keygen(
+            f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3"
+        ).out.strip()
+        csk2_name = keygen(
+            f"-l policy/csk2.conf {newtimes} {zonename}", cwd="ns3"
+        ).out.strip()
         # Key state timing metadata.
         timings = SettimeOptions(
             g="HIDDEN",
@@ -316,8 +334,12 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo
         csktimes = f"-P {TactN}  -A {TactN}  -P sync {TsbmN} -I {TsbmN1}"
         newtimes = f"-P {TpubN1} -A {TpubN1} -P sync {TsbmN1}"
         # Key generation.
-        csk1_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip()
-        csk2_name = keygen(f"-l csk2.conf {newtimes} {zonename}", cwd="ns3").out.strip()
+        csk1_name = keygen(
+            f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3"
+        ).out.strip()
+        csk2_name = keygen(
+            f"-l policy/csk2.conf {newtimes} {zonename}", cwd="ns3"
+        ).out.strip()
         # Key state timing metadata.
         timings = SettimeOptions(
             g="HIDDEN",
similarity index 98%
rename from bin/tests/system/rollover_algo_csk/tests_rollover_algo_csk_initial.py
rename to bin/tests/system/rollover/tests_rollover_algo_csk_initial.py
index 7126f21766de669e5256d689006b21f2b2e23e46..6d0216373b45bed335f2b60313354db8b2841ee8 100644 (file)
@@ -26,6 +26,7 @@ def bootstrap():
     data = {
         "tlds": [],
         "trust_anchors": [],
+        "testconf": "algo-csk",
     }
 
     tlds = []
similarity index 99%
rename from bin/tests/system/rollover_algo_csk/tests_rollover_algo_csk_reconfig.py
rename to bin/tests/system/rollover/tests_rollover_algo_csk_reconfig.py
index e83763e60127c10dc7507579b7aa64ed854a9efb..f0d1f0e65bbf5f7ea7597ae1f2fed50ce5791c74 100644 (file)
@@ -42,6 +42,7 @@ def bootstrap():
     data = {
         "tlds": [],
         "trust_anchors": [],
+        "testconf": "algo-csk",
     }
 
     tlds = []
@@ -70,7 +71,7 @@ def after_servers_start(ns3, templates):
 
     isctest.kasp.wait_keymgr_done(ns3, "step1.csk-algorithm-roll.kasp")
 
-    templates.render("ns3/named.conf", {"csk_roll": True})
+    templates.render("ns3/named-algo-csk.conf", {"csk_roll": True})
     start_time = KeyTimingMetadata.now()
     ns3.reconfigure()
 
index 004cc1c9013588e7e7246b4314d85c84b1c72331..9a9012c0a97867613431ce3b9a25e2136223f526 100644 (file)
@@ -118,6 +118,7 @@ def bootstrap():
     data = {
         "tlds": [],
         "trust_anchors": [],
+        "testconf": "rollover",
     }
     tld = configure_tld("kasp", zones)
     data["tlds"].append("kasp")
diff --git a/bin/tests/system/rollover_algo_csk/ns1 b/bin/tests/system/rollover_algo_csk/ns1
deleted file mode 120000 (symlink)
index 76608be..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../rollover/ns1
\ No newline at end of file
diff --git a/bin/tests/system/rollover_algo_csk/ns2 b/bin/tests/system/rollover_algo_csk/ns2
deleted file mode 120000 (symlink)
index 41a09bb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../rollover/ns2
\ No newline at end of file
diff --git a/bin/tests/system/rollover_algo_csk/ns3/named.common.conf.j2 b/bin/tests/system/rollover_algo_csk/ns3/named.common.conf.j2
deleted file mode 120000 (symlink)
index 5dc2617..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../rollover/ns3/named.common.conf.j2
\ No newline at end of file
diff --git a/bin/tests/system/rollover_algo_csk/ns3/template.db.j2.manual b/bin/tests/system/rollover_algo_csk/ns3/template.db.j2.manual
deleted file mode 120000 (symlink)
index 38619a0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../rollover/ns3/template.db.j2.manual
\ No newline at end of file
diff --git a/bin/tests/system/rollover_algo_csk/ns3/trusted.conf.j2 b/bin/tests/system/rollover_algo_csk/ns3/trusted.conf.j2
deleted file mode 120000 (symlink)
index 3e7d850..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../rollover/ns3/trusted.conf.j2
\ No newline at end of file