diff options
author | Haim Gelfenbeyn <haim@g8n.me> | 2024-05-30 12:13:42 -0400 |
---|---|---|
committer | Haim Gelfenbeyn <haim@g8n.me> | 2024-05-30 15:24:26 -0400 |
commit | f2d0701f50061374b5a4f55d33201629b3293248 (patch) | |
tree | dd7192adb827fe9b7acfcfd1e7cbb549b6ffe6f8 /smoketest/scripts/cli | |
parent | 19d8415512dcf87dc3a87feabf128652ffc74594 (diff) | |
download | vyos-1x-f2d0701f50061374b5a4f55d33201629b3293248.tar.gz vyos-1x-f2d0701f50061374b5a4f55d33201629b3293248.zip |
T6422: Smoke test for NS record configration in authoritative DNS, typo & style fixes
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-x | smoketest/scripts/cli/test_service_dns_forwarding.py | 10 |
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) |