diff options
| author | mrpops2ko <34683587+mrpops2ko@users.noreply.github.com> | 2026-06-18 15:17:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-18 16:17:06 +0200 |
| commit | e64100195d16744db173d3217e6ec1e596c34ff1 (patch) | |
| tree | 553f6ae7d32f0320834b864185b5c246315ed7c3 /smoketest/scripts/cli | |
| parent | 38e2293e046e88f4773f67d2084fdaf101c3fd6a (diff) | |
| download | vyos-1x-e64100195d16744db173d3217e6ec1e596c34ff1.tar.gz vyos-1x-e64100195d16744db173d3217e6ec1e596c34ff1.zip | |
T8881: dns: expose PowerDNS recursor cache tuning options (#5209)
Add refresh-on-ttl-perc, nothing-below-nxdomain, and minimum-ttl-override
under service dns forwarding with recursor template and smoketest coverage.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Daniil Baturin <daniil@baturin.org>
Diffstat (limited to 'smoketest/scripts/cli')
| -rwxr-xr-x | smoketest/scripts/cli/test_service_dns_forwarding.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_dns_forwarding.py b/smoketest/scripts/cli/test_service_dns_forwarding.py index ffc0d7734..52134d8c8 100755 --- a/smoketest/scripts/cli/test_service_dns_forwarding.py +++ b/smoketest/scripts/cli/test_service_dns_forwarding.py @@ -131,6 +131,28 @@ class TestServicePowerDNS(VyOSUnitTestSHIM.TestCase): tmp = get_config_value('local-port') self.assertEqual(tmp, '53') + # PowerDNS cache-related recursor options + def test_recursor_cache_options(self): + ttl_percent = '10' + nothing_below_nxdomain = 'yes' + minimum_ttl_override = '30' + + self.cli_set(base_path + ['ttl-percent', ttl_percent]) + self.cli_set(base_path + ['nothing-below-nxdomain', nothing_below_nxdomain]) + self.cli_set(base_path + ['minimum-ttl-override', minimum_ttl_override]) + + self.cli_commit() + + self.assertEqual(get_config_value('refresh-on-ttl-perc'), ttl_percent) + self.assertEqual(get_config_value('nothing-below-nxdomain'), nothing_below_nxdomain) + self.assertEqual(get_config_value('minimum-ttl-override'), minimum_ttl_override) + + def test_nothing_below_nxdomain(self): + for option in ['no', 'dnssec', 'yes']: + self.cli_set(base_path + ['nothing-below-nxdomain', option]) + self.cli_commit() + self.assertEqual(get_config_value('nothing-below-nxdomain'), option) + def test_dnssec(self): # DNSSEC option testing options = ['off', 'process-no-validate', 'process', 'log-fail', 'validate'] |
