]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Test that 'rndc-confgen -q' works as documented 12570/head
authorMark Andrews <marka@isc.org>
Thu, 13 Aug 2026 02:36:56 +0000 (12:36 +1000)
committerMark Andrews <marka@isc.org>
Thu, 13 Aug 2026 02:36:56 +0000 (12:36 +1000)
bin/tests/system/rndc_confgen/tests_rndc_confgen.py

index fc9e9ca097d93b670d90b58a67779c56ab563b00..3abafd3f8fe029c31f29a648c50dbf2df126a279 100644 (file)
@@ -34,6 +34,16 @@ def test_rndc_confgen_default():
     assert b'key "rndc-key" {' in cmd.proc.stdout
 
 
+def test_rndc_confgen_keyonly():
+    cmd = isctest.run.cmd([os.environ["RNDCCONFGEN"], "-a", "-c", "rndc.key"])
+    assert b'wrote key file "rndc.key"' in cmd.proc.stdout
+
+
+def test_rndc_confgen_keyonlyquiet():
+    cmd = isctest.run.cmd([os.environ["RNDCCONFGEN"], "-a", "-c", "rndc.key", "-q"])
+    assert b'wrote key file "rndc.key"' not in cmd.proc.stdout
+
+
 def test_rndc_confgen_keyname_with_dots():
     cmd = isctest.run.cmd([os.environ["RNDCCONFGEN"], "-k", "key.example.com"])
     assert b'key "key.example.com" {' in cmd.proc.stdout