diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-07-07 12:35:46 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-07-07 12:35:46 +0200 |
commit | 82945a7ff0899295776b5a4bc009fe6513bcdbda (patch) | |
tree | 67766295f13f63f41032be678e6feedec40cdae3 /smoketest/scripts | |
parent | 8e2f99db12ad97cfd371fdaa6466e2d443890645 (diff) | |
download | vyos-1x-82945a7ff0899295776b5a4bc009fe6513bcdbda.tar.gz vyos-1x-82945a7ff0899295776b5a4bc009fe6513bcdbda.zip |
smoketest: dns: T4509: use dedicated 6to4 testcase
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-x | smoketest/scripts/cli/test_service_dns_forwarding.py | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/smoketest/scripts/cli/test_service_dns_forwarding.py b/smoketest/scripts/cli/test_service_dns_forwarding.py index 117b11a8a..65b676451 100755 --- a/smoketest/scripts/cli/test_service_dns_forwarding.py +++ b/smoketest/scripts/cli/test_service_dns_forwarding.py @@ -62,7 +62,6 @@ class TestServicePowerDNS(VyOSUnitTestSHIM.TestCase): # Check basic DNS forwarding settings cache_size = '20' negative_ttl = '120' - dns_prefix = '64:ff9b::/96' self.cli_set(base_path + ['cache-size', cache_size]) self.cli_set(base_path + ['negative-ttl', negative_ttl]) @@ -79,12 +78,6 @@ class TestServicePowerDNS(VyOSUnitTestSHIM.TestCase): for address in listen_adress: self.cli_set(base_path + ['listen-address', address]) - # Check dns64-prefix - must be prefix /96 - self.cli_set(base_path + ['dns64-prefix', '2001:db8:aabb::/64']) - with self.assertRaises(ConfigSessionError): - self.cli_commit() - self.cli_set(base_path + ['dns64-prefix', dns_prefix]) - # configure DNSSEC self.cli_set(base_path + ['dnssec', 'validate']) @@ -118,10 +111,6 @@ class TestServicePowerDNS(VyOSUnitTestSHIM.TestCase): tmp = get_config_value('serve-rfc1918') self.assertEqual(tmp, 'yes') - # dns64-prefix - tmp = get_config_value('dns64-prefix') - self.assertEqual(tmp, dns_prefix) - def test_dnssec(self): # DNSSEC option testing @@ -214,5 +203,26 @@ class TestServicePowerDNS(VyOSUnitTestSHIM.TestCase): tmp = get_config_value('serve-rfc1918') self.assertEqual(tmp, 'no') + def test_dns64(self): + dns_prefix = '64:ff9b::/96' + + for network in allow_from: + self.cli_set(base_path + ['allow-from', network]) + for address in listen_adress: + self.cli_set(base_path + ['listen-address', address]) + + # Check dns64-prefix - must be prefix /96 + self.cli_set(base_path + ['dns64-prefix', '2001:db8:aabb::/64']) + with self.assertRaises(ConfigSessionError): + self.cli_commit() + self.cli_set(base_path + ['dns64-prefix', dns_prefix]) + + # commit changes + self.cli_commit() + + # verify dns64-prefix configuration + tmp = get_config_value('dns64-prefix') + self.assertEqual(tmp, dns_prefix) + if __name__ == '__main__': unittest.main(verbosity=2) |