summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-12 17:07:21 +0100
committerGitHub <noreply@github.com>2021-01-12 17:07:21 +0100
commit7b45f5afb718233f99635b86421130c7d3a920ae (patch)
tree26c9ea07a28122906f70dc140ed78a9e2f326738 /smoketest
parent92add34ea4a7e108bc92457393d39bc5af5f671f (diff)
parenta051c928aeb2a14250d57c8495c07474c92a8b61 (diff)
downloadvyos-1x-7b45f5afb718233f99635b86421130c7d3a920ae.tar.gz
vyos-1x-7b45f5afb718233f99635b86421130c7d3a920ae.zip
Merge pull request #674 from sever-sever/T2944
ntp: T2944: Fix ntp bug. Revert to previous behavior
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_system_ntp.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_system_ntp.py b/smoketest/scripts/cli/test_system_ntp.py
index 7d1bc144f..986c8dfb2 100755
--- a/smoketest/scripts/cli/test_system_ntp.py
+++ b/smoketest/scripts/cli/test_system_ntp.py
@@ -76,7 +76,11 @@ class TestSystemNTP(unittest.TestCase):
self.assertTrue(process_named_running(PROCESS_NAME))
def test_ntp_clients(self):
- # Test the allowed-networks statement
+ """ Test the allowed-networks statement """
+ listen_address = ['127.0.0.1', '::1']
+ for listen in listen_address:
+ self.session.set(base_path + ['listen-address', listen])
+
networks = ['192.0.2.0/24', '2001:db8:1000::/64']
for network in networks:
self.session.set(base_path + ['allow-clients', 'address', network])
@@ -102,7 +106,9 @@ class TestSystemNTP(unittest.TestCase):
# Check listen address
tmp = get_config_value('interface')
- test = ['ignore wildcard', 'listen 127.0.0.1', 'listen ::1']
+ test = ['ignore wildcard']
+ for listen in listen_address:
+ test.append(f'listen {listen}')
self.assertEqual(tmp, test)
# Check for running process