summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-26 20:10:07 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-26 20:50:09 +0100
commit458b24c3b365a1a6ea0b8e6b59a2baba2b24c7e6 (patch)
tree4ea6cfb29ece540a79ef49c001a572dcb3c13fd4 /smoketest/scripts/cli
parentb48890396dcff074d1e9336ca1db9d3eafe2a12f (diff)
downloadvyos-1x-458b24c3b365a1a6ea0b8e6b59a2baba2b24c7e6.tar.gz
vyos-1x-458b24c3b365a1a6ea0b8e6b59a2baba2b24c7e6.zip
Revert "smoketest: dhcpc6: do not increase duid"
This reverts commit 1992d9aed31b6906806635687c2b2d2d52310990. After commit b4889039 ("smoketest: refactor setUp() for all interface based testcases") we can now use dynamic duid tests.
Diffstat (limited to 'smoketest/scripts/cli')
-rw-r--r--smoketest/scripts/cli/base_interfaces_test.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/base_interfaces_test.py b/smoketest/scripts/cli/base_interfaces_test.py
index 8f21ec70e..1426e80c2 100644
--- a/smoketest/scripts/cli/base_interfaces_test.py
+++ b/smoketest/scripts/cli/base_interfaces_test.py
@@ -402,12 +402,13 @@ class BasicInterfaceTest:
tmp = read_file(f'/proc/sys/net/ipv6/conf/{interface}/dad_transmits')
self.assertEqual(dad_transmits, tmp)
- def test_dhcpv6_client_options(self):
+ def test_dhcpv6_clinet_options(self):
if not self._test_ipv6_dhcpc6:
self.skipTest('not supported')
- duid = '00:01:00:01:27:71:db:f0:00:50:00:00:00:10'
+ duid_base = 10
for interface in self._interfaces:
+ duid = '00:01:00:01:27:71:db:f0:00:50:00:00:00:{}'.format(duid_base)
path = self._base_path + [interface]
for option in self._options.get(interface, []):
self.session.set(path + option.split())
@@ -417,10 +418,13 @@ class BasicInterfaceTest:
self.session.set(path + ['dhcpv6-options', 'rapid-commit'])
self.session.set(path + ['dhcpv6-options', 'parameters-only'])
self.session.set(path + ['dhcpv6-options', 'duid', duid])
+ duid_base += 1
self.session.commit()
+ duid_base = 10
for interface in self._interfaces:
+ duid = '00:01:00:01:27:71:db:f0:00:50:00:00:00:{}'.format(duid_base)
dhcpc6_config = read_file(f'/run/dhcp6c/dhcp6c.{interface}.conf')
self.assertIn(f'interface {interface} ' + '{', dhcpc6_config)
self.assertIn(f' request domain-name-servers;', dhcpc6_config)
@@ -430,6 +434,7 @@ class BasicInterfaceTest:
self.assertIn(f' send rapid-commit;', dhcpc6_config)
self.assertIn(f' send client-id {duid};', dhcpc6_config)
self.assertIn('};', dhcpc6_config)
+ duid_base += 1
# Check for running process
self.assertTrue(process_named_running('dhcp6c'))