diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-01-16 20:24:53 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-01-16 21:34:30 +0100 |
commit | b2b5ea81243f672d3cc3c4082374551f38fd4dde (patch) | |
tree | ac8538c79480f6f6236af30c14b8d935ae376979 /smoketest/scripts/cli/test_interfaces_ethernet.py | |
parent | b373d3841608838fd28f98691cb14e42c128c216 (diff) | |
download | vyos-1x-b2b5ea81243f672d3cc3c4082374551f38fd4dde.tar.gz vyos-1x-b2b5ea81243f672d3cc3c4082374551f38fd4dde.zip |
smoketest: interfaces: use provided unittest framework assert methods
Diffstat (limited to 'smoketest/scripts/cli/test_interfaces_ethernet.py')
-rwxr-xr-x | smoketest/scripts/cli/test_interfaces_ethernet.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_ethernet.py b/smoketest/scripts/cli/test_interfaces_ethernet.py index 42c1f15df..9d896f690 100755 --- a/smoketest/scripts/cli/test_interfaces_ethernet.py +++ b/smoketest/scripts/cli/test_interfaces_ethernet.py @@ -78,8 +78,13 @@ class EthernetInterfaceTest(BasicInterfaceTest.BaseTest): self.session.set(self._base_path + [interface, 'speed', 'auto']) self.session.set(self._base_path + [interface, 'hw-id', self._macs[interface]]) - super().tearDown() + # Tear down mirror interfaces for SPAN (Switch Port Analyzer) + for span in self._mirror_interfaces: + section = Section.section(span) + self.session.delete(['interfaces', section, span]) + self.session.commit() + del self.session def test_dhcp_disable_interface(self): # When interface is configured as admin down, it must be admin down @@ -193,12 +198,12 @@ if __name__ == '__main__': # Generate mandatory SSL certificate tmp = f'openssl req -newkey rsa:4096 -new -nodes -x509 -days 3650 '\ f'-keyout {ssl_key} -out {ssl_cert} -subj {subject}' - print(cmd(tmp)) + cmd(tmp) if not os.path.isfile(ca_cert): # Generate "CA" tmp = f'openssl req -new -x509 -key {ssl_key} -out {ca_cert} -subj {subject}' - print(cmd(tmp)) + cmd(tmp) for file in [ca_cert, ssl_cert, ssl_key]: cmd(f'sudo chown radius_priv_user:vyattacfg {file}') |