diff options
author | Daniil Baturin <daniil@vyos.io> | 2021-08-02 03:29:12 -0500 |
---|---|---|
committer | Daniil Baturin <daniil@vyos.io> | 2021-08-02 03:29:12 -0500 |
commit | f0148b9306846a34c86f1726fd7ffb37143c94c7 (patch) | |
tree | f59896e306ddc21130e6d2682795f623abed7fb1 /smoketest | |
parent | 50a1392564611951142b8a2ca7d2af0dc4cb5cc7 (diff) | |
parent | f83a5125735bb2f63e4d98e1b264eb689a2ef00f (diff) | |
download | vyos-1x-f0148b9306846a34c86f1726fd7ffb37143c94c7.tar.gz vyos-1x-f0148b9306846a34c86f1726fd7ffb37143c94c7.zip |
Merge branch 'equuleus' of https://github.com/vyos/vyos-1x into equuleus
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_service_router-advert.py | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_service_router-advert.py b/smoketest/scripts/cli/test_service_router-advert.py index b19c49c6e..26b4626c2 100755 --- a/smoketest/scripts/cli/test_service_router-advert.py +++ b/smoketest/scripts/cli/test_service_router-advert.py @@ -43,11 +43,10 @@ class TestServiceRADVD(VyOSUnitTestSHIM.TestCase): self.cli_delete(base_path) self.cli_commit() - def test_single(self): + def test_common(self): self.cli_set(base_path + ['prefix', '::/64', 'no-on-link-flag']) self.cli_set(base_path + ['prefix', '::/64', 'no-autonomous-flag']) self.cli_set(base_path + ['prefix', '::/64', 'valid-lifetime', 'infinity']) - self.cli_set(base_path + ['dnssl', '2001:db8::1234']) self.cli_set(base_path + ['other-config-flag']) # commit changes @@ -92,5 +91,28 @@ class TestServiceRADVD(VyOSUnitTestSHIM.TestCase): # Check for running process self.assertTrue(process_named_running('radvd')) + def test_dns(self): + nameserver = ['2001:db8::1', '2001:db8::2'] + dnssl = ['vyos.net', 'vyos.io'] + + self.cli_set(base_path + ['prefix', '::/64', 'valid-lifetime', 'infinity']) + self.cli_set(base_path + ['other-config-flag']) + + for ns in nameserver: + self.cli_set(base_path + ['name-server', ns]) + for sl in dnssl: + self.cli_set(base_path + ['dnssl', sl]) + + # commit changes + self.cli_commit() + + config = read_file(RADVD_CONF) + + tmp = 'RDNSS ' + ' '.join(nameserver) + ' {' + self.assertIn(tmp, config) + + tmp = 'DNSSL ' + ' '.join(dnssl) + ' {' + self.assertIn(tmp, config) + if __name__ == '__main__': unittest.main(verbosity=2) |