diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-10-18 18:14:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-18 18:14:56 +0200 |
commit | c3a65c60cfc854113a9af371f37fba6eb71ad05e (patch) | |
tree | ea368cee60a3c798f94ba5210477b9079195d83d /smoketest/scripts | |
parent | 56810c62f91d3f11e23b2836bb4d14db6ec8ce25 (diff) | |
parent | 35aeea69c62a1755595d34b856d03f58cdd2da4c (diff) | |
download | vyos-1x-c3a65c60cfc854113a9af371f37fba6eb71ad05e.tar.gz vyos-1x-c3a65c60cfc854113a9af371f37fba6eb71ad05e.zip |
Merge pull request #1022 from sever-sever/T3897
ddclient: T3897: Add option for IPv6 Dynamic DNS
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-x | smoketest/scripts/cli/test_service_dns_dynamic.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_dns_dynamic.py b/smoketest/scripts/cli/test_service_dns_dynamic.py index d8a87ffd4..03fccf2c7 100755 --- a/smoketest/scripts/cli/test_service_dns_dynamic.py +++ b/smoketest/scripts/cli/test_service_dns_dynamic.py @@ -24,6 +24,7 @@ from vyos.configsession import ConfigSession from vyos.configsession import ConfigSessionError from vyos.util import cmd from vyos.util import process_named_running +from vyos.util import read_file PROCESS_NAME = 'ddclient' DDCLIENT_CONF = '/run/ddclient/ddclient.conf' @@ -122,5 +123,42 @@ class TestServiceDDNS(VyOSUnitTestSHIM.TestCase): # Check for running process self.assertTrue(process_named_running(PROCESS_NAME)) + def test_dyndns_ipv6(self): + ddns = ['interface', 'eth0', 'service', 'dynv6'] + hostname = 'test.ddns.vyos.io' + proto = 'dyndns2' + user = 'none' + password = 'paSS_4ord' + servr = 'ddns.vyos.io' + + self.cli_set(base_path + ['interface', 'eth0', 'ipv6-enable']) + self.cli_set(base_path + ddns + ['host-name', hostname]) + self.cli_set(base_path + ddns + ['login', user]) + self.cli_set(base_path + ddns + ['password', password]) + self.cli_set(base_path + ddns + ['protocol', proto]) + self.cli_set(base_path + ddns + ['server', servr]) + + # commit changes + self.cli_commit() + + # Check for running process + self.assertTrue(process_named_running(PROCESS_NAME)) + + config = read_file(DDCLIENT_CONF) + + protocol = get_config_value('protocol') + login = get_config_value('login') + pwd = get_config_value('password') + server = get_config_value('server') + + # Check some generating config parameters + self.assertTrue(protocol == proto) + self.assertTrue(login == user) + self.assertTrue(pwd == "'" + password + "'") + self.assertTrue(server == servr) + + self.assertIn('usev6=if', config) + self.assertIn(hostname, config) + if __name__ == '__main__': unittest.main(verbosity=2) |