summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-11-21 21:18:17 +0100
committerChristian Breunig <christian@breunig.cc>2023-11-21 21:18:58 +0100
commit1f7968d032df2a86069b739416d1ca50501aa491 (patch)
treee7a74f5829d467d1437fc7489bdbbc3a054b9d08 /smoketest/scripts/cli
parent945dacc0d136bf4e2dfe593d8d9809262d0cfeaa (diff)
downloadvyos-1x-1f7968d032df2a86069b739416d1ca50501aa491.tar.gz
vyos-1x-1f7968d032df2a86069b739416d1ca50501aa491.zip
smoketest: macsec: T5770: fix NameError: name 'cipher' is not defined
(cherry picked from commit 02a3e26e88f0ac3c7368e288769bfed38b41df46)
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_macsec.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_macsec.py b/smoketest/scripts/cli/test_interfaces_macsec.py
index 6e57fdfd4..d8d564792 100755
--- a/smoketest/scripts/cli/test_interfaces_macsec.py
+++ b/smoketest/scripts/cli/test_interfaces_macsec.py
@@ -22,10 +22,10 @@ from netifaces import interfaces
from vyos.configsession import ConfigSessionError
from vyos.ifconfig import Section
-from vyos.utils.process import cmd
from vyos.utils.file import read_file
from vyos.utils.network import get_interface_config
from vyos.utils.network import interface_exists
+from vyos.utils.process import cmd
from vyos.utils.process import process_named_running
PROCESS_NAME = 'wpa_supplicant'
@@ -138,7 +138,7 @@ class MACsecInterfaceTest(BasicInterfaceTest.TestCase):
# final commit and verify
self.cli_commit()
- self.assertIn(interface, interfaces())
+ self.assertTrue(interface_exists(interface))
# Verify proper cipher suite (T4537)
tmp = get_interface_config(interface)
@@ -162,7 +162,7 @@ class MACsecInterfaceTest(BasicInterfaceTest.TestCase):
# final commit and verify
self.cli_commit()
- self.assertIn(interface, interfaces())
+ self.assertTrue(interface_exists(interface))
# Verify proper cipher suite (T4537)
tmp = get_interface_config(interface)
@@ -193,7 +193,7 @@ class MACsecInterfaceTest(BasicInterfaceTest.TestCase):
# final commit and verify
self.cli_commit()
- self.assertIn(interface, interfaces())
+ self.assertTrue(interface_exists(interface))
def test_macsec_static_keys(self):
src_interface = 'eth0'
@@ -263,11 +263,10 @@ class MACsecInterfaceTest(BasicInterfaceTest.TestCase):
# final commit and verify
self.cli_commit()
- self.assertIn(interface, interfaces())
- self.assertTrue(interface_exists(interface))
+ self.assertTrue(interface_exists(interface))
tmp = get_interface_config(interface)
- self.assertEqual(cipher, tmp['linkinfo']['info_data']['cipher_suite'].lower())
+ self.assertEqual(cipher2, tmp['linkinfo']['info_data']['cipher_suite'].lower())
# Encryption enabled?
self.assertTrue(tmp['linkinfo']['info_data']['encrypt'])