summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-01-06 23:22:06 +0200
committerGitHub <noreply@github.com>2024-01-06 23:22:06 +0200
commit4aea0c4c9ef90b7156b05428ded4d41d21ad8589 (patch)
tree2a2c8f4a7c095bc1e8783a6ee66bd99b098a26ea
parent0a2430001e2e4e9a75d802428d9a7f9b56fafd41 (diff)
parent689a26c03a2b32536d2b1226a914e2d029c4f54e (diff)
downloadvyos-1x-4aea0c4c9ef90b7156b05428ded4d41d21ad8589.tar.gz
vyos-1x-4aea0c4c9ef90b7156b05428ded4d41d21ad8589.zip
Merge pull request #2762 from vyos/mergify/bp/sagitta/pr-2761
dns: T5900: fix smoketests for serve-stale-extension and exclude-throttle-address (backport #2761)
-rw-r--r--data/templates/dns-forwarding/recursor.conf.j24
-rwxr-xr-xsmoketest/scripts/cli/test_service_dns_forwarding.py12
2 files changed, 8 insertions, 8 deletions
diff --git a/data/templates/dns-forwarding/recursor.conf.j2 b/data/templates/dns-forwarding/recursor.conf.j2
index deeb250f0..55b37732b 100644
--- a/data/templates/dns-forwarding/recursor.conf.j2
+++ b/data/templates/dns-forwarding/recursor.conf.j2
@@ -40,12 +40,12 @@ dnssec={{ dnssec }}
dns64-prefix={{ dns64_prefix }}
{% endif %}
-{% if dont_throttle_netmasks is vyos_defined %}
+{% if exclude_throttle_address is vyos_defined %}
# dont-throttle-netmasks
dont-throttle-netmasks={{ exclude_throttle_address | join(',') }}
{% endif %}
-{% if serve_stale_extensions is vyos_defined %}
+{% if serve_stale_extension is vyos_defined %}
# serve-stale-extensions
serve-stale-extensions={{ serve_stale_extension }}
{% endif %}
diff --git a/smoketest/scripts/cli/test_service_dns_forwarding.py b/smoketest/scripts/cli/test_service_dns_forwarding.py
index 4f2f182e5..85a5f1448 100755
--- a/smoketest/scripts/cli/test_service_dns_forwarding.py
+++ b/smoketest/scripts/cli/test_service_dns_forwarding.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2019-2022 VyOS maintainers and contributors
+# Copyright (C) 2019-2024 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -43,7 +43,6 @@ class TestServicePowerDNS(VyOSUnitTestSHIM.TestCase):
@classmethod
def setUpClass(cls):
super(TestServicePowerDNS, cls).setUpClass()
-
# ensure we can also run this test on a live system - so lets clean
# out the current configuration :)
cls.cli_delete(cls, base_path)
@@ -259,23 +258,24 @@ class TestServicePowerDNS(VyOSUnitTestSHIM.TestCase):
self.cli_commit()
# verify dont-throttle-netmasks configuration
- tmp = get_config_value('exclude-throttle-address')
+ tmp = get_config_value('dont-throttle-netmasks')
self.assertEqual(tmp, ','.join(exclude_throttle_adress_examples))
def test_serve_stale_extension(self):
+ server_stale = '20'
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])
- self.cli_set(base_path + ['serve-stale-extension', '20'])
+ self.cli_set(base_path + ['serve-stale-extension', server_stale])
# commit changes
self.cli_commit()
# verify configuration
- tmp = get_config_value('serve-stale-extension')
- self.assertEqual(tmp, '20')
+ tmp = get_config_value('serve-stale-extensions')
+ self.assertEqual(tmp, server_stale)
def test_listening_port(self):
# We can listen on a different port compared to '53' but only one at a time