summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-07-07 16:42:27 +0200
committerGitHub <noreply@github.com>2022-07-07 16:42:27 +0200
commit7b998593c931757994a8965999366f2d7c9c93f3 (patch)
tree1a7b3c6f054bf700ad5b857e1ba037bd5c9ddc92 /smoketest
parent5b563a78e1bd20c03a77527052585f025d6e7b4b (diff)
parent8638fda374b06d6775e78bccbb61368fe0637afb (diff)
downloadvyos-1x-7b998593c931757994a8965999366f2d7c9c93f3.tar.gz
vyos-1x-7b998593c931757994a8965999366f2d7c9c93f3.zip
Merge pull request #1390 from c-po/t4456-ntp-equuleus
ntp: T4456: support listening on specified interface (equuleus)
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_system_ntp.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_system_ntp.py b/smoketest/scripts/cli/test_system_ntp.py
index c8cf04b7d..0ee96157c 100755
--- a/smoketest/scripts/cli/test_system_ntp.py
+++ b/smoketest/scripts/cli/test_system_ntp.py
@@ -108,5 +108,22 @@ class TestSystemNTP(VyOSUnitTestSHIM.TestCase):
for listen in listen_address:
self.assertIn(f'interface listen {listen}', config)
+ def test_03_ntp_interface(self):
+ interfaces = ['eth0', 'eth1']
+ for interface in interfaces:
+ self.cli_set(base_path + ['interface', interface])
+
+ servers = ['time1.vyos.net', 'time2.vyos.net']
+ for server in servers:
+ self.cli_set(base_path + ['server', server])
+
+ self.cli_commit()
+
+ # Check generated client address configuration
+ config = read_file(NTP_CONF)
+ self.assertIn('interface ignore wildcard', config)
+ for interface in interfaces:
+ self.assertIn(f'interface listen {interface}', config)
+
if __name__ == '__main__':
unittest.main(verbosity=2)