summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-02-20 20:07:34 +0100
committerChristian Poessinger <christian@poessinger.com>2022-02-20 20:08:55 +0100
commit5ae566086c5c190d52b15f64454abcae9c8a1d46 (patch)
tree050b079df5b993fe3ee80220839adea882f4c7f9
parent35e6871c4fdece73962902d10d835ccac0c7e364 (diff)
downloadvyos-1x-5ae566086c5c190d52b15f64454abcae9c8a1d46.tar.gz
vyos-1x-5ae566086c5c190d52b15f64454abcae9c8a1d46.zip
smoketest: dhcp: T4203: set missing interface options if present
Commit 5d14a04b ("smoketest: dhcp: T4203: move testcase to base class") added global support in the test case framework for DHCP tests. Some interfaces (e.g. MACsec) require additional options to be passed before the test can be launched. In the MACsec case this includes a source interface, or encryption ciphers.
-rw-r--r--smoketest/scripts/cli/base_interfaces_test.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/base_interfaces_test.py b/smoketest/scripts/cli/base_interfaces_test.py
index 013c78837..ba5acf5d6 100644
--- a/smoketest/scripts/cli/base_interfaces_test.py
+++ b/smoketest/scripts/cli/base_interfaces_test.py
@@ -109,6 +109,10 @@ class BasicInterfaceTest:
# even when dhcpc starts on the given interface
for interface in self._interfaces:
self.cli_set(self._base_path + [interface, 'disable'])
+ for option in self._options.get(interface, []):
+ self.cli_set(self._base_path + [interface] + option.split())
+
+ self.cli_set(self._base_path + [interface, 'disable'])
# Also enable DHCP (ISC DHCP always places interface in admin up
# state so we check that we do not start DHCP client.