diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-01-07 21:41:12 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-01-07 23:23:53 +0100 |
commit | fde684497e9be82123cffefa3e4766689e4dabc6 (patch) | |
tree | 2e0302786778997af8db95a3ebc769b7bd72c8fa /smoketest | |
parent | e8a1c291b1d4b90709a68038e16522b4cee82904 (diff) | |
download | vyos-1x-fde684497e9be82123cffefa3e4766689e4dabc6.tar.gz vyos-1x-fde684497e9be82123cffefa3e4766689e4dabc6.zip |
smoketest: interfaces: fix dhcpv6 pd testcase when using multiple interfaces
Commit a8e4317c ("smoketest: interfaces: test dhcpv6 pd sla-id auto increment")
added a new test, but when executed on multiple interfaces, e.g.:
TEST_ETH="eth1 eth2" /usr/libexec/vyos/tests/smoke/cli/test_interfaces_ethernet.py
A variable was not properly reset
Diffstat (limited to 'smoketest')
-rw-r--r-- | smoketest/scripts/cli/base_interfaces_test.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/base_interfaces_test.py b/smoketest/scripts/cli/base_interfaces_test.py index ad7886414..5efa39bd5 100644 --- a/smoketest/scripts/cli/base_interfaces_test.py +++ b/smoketest/scripts/cli/base_interfaces_test.py @@ -395,13 +395,13 @@ class BasicInterfaceTest: self.session.commit() address = '1' - sla_id = '0' for interface in self._interfaces: dhcpc6_config = read_file(f'/run/dhcp6c/dhcp6c.{interface}.conf') # verify DHCPv6 prefix delegation self.assertIn(f'prefix ::/{prefix_len} infinity;', dhcpc6_config) + sla_id = '0' for delegatee in delegatees: self.assertIn(f'prefix-interface {delegatee}' + r' {', dhcpc6_config) self.assertIn(f'ifid {address};', dhcpc6_config) @@ -446,7 +446,7 @@ class BasicInterfaceTest: section = Section.section(delegatee) self.session.set(['interfaces', section, delegatee]) self.session.set(pd_base + ['interface', delegatee, 'address', address]) - self.session.set(pd_base + ['interface', delegatee, 'sla-id', address]) + self.session.set(pd_base + ['interface', delegatee, 'sla-id', sla_id]) # increment interface address address = str(int(address) + 1) |