summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-31 11:39:00 +0200
committerGitHub <noreply@github.com>2024-05-31 11:39:00 +0200
commitea477ed0cec87041cb94c0eb2bc2ce9523a92a0a (patch)
tree2afa662aeb1dbb3f42fe6c26fbd6ed8b2058c976 /smoketest
parent5563bcd9eaef5d5d8a020b92d43a86028e3c26c1 (diff)
parentf2d0701f50061374b5a4f55d33201629b3293248 (diff)
downloadvyos-1x-ea477ed0cec87041cb94c0eb2bc2ce9523a92a0a.tar.gz
vyos-1x-ea477ed0cec87041cb94c0eb2bc2ce9523a92a0a.zip
Merge pull request #3557 from haimgel/T6422/allow-multiple-ns-records
dns: T6422: allow multiple redundant NS records
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_service_dns_forwarding.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_dns_forwarding.py b/smoketest/scripts/cli/test_service_dns_forwarding.py
index 079c584ba..4db1d7495 100755
--- a/smoketest/scripts/cli/test_service_dns_forwarding.py
+++ b/smoketest/scripts/cli/test_service_dns_forwarding.py
@@ -291,5 +291,15 @@ class TestServicePowerDNS(VyOSUnitTestSHIM.TestCase):
tmp = get_config_value('edns-subnet-allow-list')
self.assertEqual(tmp, ','.join(options))
+ def test_multiple_ns_records(self):
+ test_zone = 'example.com'
+ self.cli_set(base_path + ['authoritative-domain', test_zone, 'records', 'ns', 'test', 'target', f'ns1.{test_zone}'])
+ self.cli_set(base_path + ['authoritative-domain', test_zone, 'records', 'ns', 'test', 'target', f'ns2.{test_zone}'])
+ self.cli_commit()
+ zone_config = read_file(f'{PDNS_REC_RUN_DIR}/zone.{test_zone}.conf')
+ self.assertRegex(zone_config, fr'test\s+\d+\s+NS\s+ns1\.{test_zone}\.')
+ self.assertRegex(zone_config, fr'test\s+\d+\s+NS\s+ns2\.{test_zone}\.')
+
+
if __name__ == '__main__':
unittest.main(verbosity=2)