summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorViacheslav <v.gletenko@vyos.io>2021-10-11 06:32:07 +0000
committerViacheslav <v.gletenko@vyos.io>2021-10-18 15:25:20 +0000
commit35aeea69c62a1755595d34b856d03f58cdd2da4c (patch)
tree4077d6370136d98e37686c2b42719a665c5ec8aa /smoketest/scripts
parentadc7ef387d40e92bd7163ee6b401e99e554394a3 (diff)
downloadvyos-1x-35aeea69c62a1755595d34b856d03f58cdd2da4c.tar.gz
vyos-1x-35aeea69c62a1755595d34b856d03f58cdd2da4c.zip
ddclient: T3897: Add option for IPv6 Dynamic DNS
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_service_dns_dynamic.py38
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)