summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-25 22:44:46 +0200
committerGitHub <noreply@github.com>2024-07-25 22:44:46 +0200
commit24881b05629918eb26fbffb6ee63a49a1f858527 (patch)
treee94a94ea9a65083bf645e79623a1f4616e278a3a
parent35a675e21a4bc92b70b6ff070017bf7dcef6f3a5 (diff)
parent4cbb171720cd24bb433a15f1bee0071c43a74e32 (diff)
downloadvyos-1x-24881b05629918eb26fbffb6ee63a49a1f858527.tar.gz
vyos-1x-24881b05629918eb26fbffb6ee63a49a1f858527.zip
Merge pull request #3880 from c-po/sagitta-wireless-smoketest
smoketest: T6425: fix wireless smoketest CLI from invalid backport
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_wireless.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_wireless.py b/smoketest/scripts/cli/test_interfaces_wireless.py
index 7bfe0d221..ba2f60a89 100755
--- a/smoketest/scripts/cli/test_interfaces_wireless.py
+++ b/smoketest/scripts/cli/test_interfaces_wireless.py
@@ -34,7 +34,6 @@ def get_config_value(interface, key):
tmp = re.findall(f'{key}=+(.*)', tmp)
return tmp[0]
-wifi_cc_path = ['system', 'wireless', 'country-code']
country = 'se'
class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
@classmethod
@@ -42,19 +41,23 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
cls._base_path = ['interfaces', 'wireless']
cls._options = {
'wlan0': ['physical-device phy0',
+ f'country-code {country}',
'ssid VyOS-WIFI-0',
'type station',
'address 192.0.2.1/30'],
'wlan1': ['physical-device phy0',
+ f'country-code {country}',
'ssid VyOS-WIFI-1',
'type access-point',
'address 192.0.2.5/30',
'channel 0'],
'wlan10': ['physical-device phy1',
+ f'country-code {country}',
'ssid VyOS-WIFI-2',
'type station',
'address 192.0.2.9/30'],
'wlan11': ['physical-device phy1',
+ f'country-code {country}',
'ssid VyOS-WIFI-3',
'type access-point',
'address 192.0.2.13/30',
@@ -68,9 +71,6 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
cls._test_ipv6 = False
cls._test_vlan = False
- cls.cli_set(cls, wifi_cc_path + [country])
-
-
def test_wireless_add_single_ip_address(self):
# derived method to check if member interfaces are enslaved properly
super().test_add_single_ip_address()
@@ -91,6 +91,7 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
ssid = 'ssid'
self.cli_set(self._base_path + [interface, 'ssid', ssid])
+ self.cli_set(self._base_path + [interface, 'country-code', country])
self.cli_set(self._base_path + [interface, 'type', 'access-point'])
# auto-powersave is special
@@ -169,6 +170,7 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
antennas = '3'
self.cli_set(self._base_path + [interface, 'ssid', ssid])
+ self.cli_set(self._base_path + [interface, 'country-code', country])
self.cli_set(self._base_path + [interface, 'type', 'access-point'])
self.cli_set(self._base_path + [interface, 'channel', '36'])
@@ -238,6 +240,7 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
antennas = '3'
self.cli_set(self._base_path + [interface, 'ssid', ssid])
+ self.cli_set(self._base_path + [interface, 'country-code', country])
self.cli_set(self._base_path + [interface, 'type', 'access-point'])
self.cli_set(self._base_path + [interface, 'channel', '36'])
@@ -311,6 +314,7 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
center_channel_freq_1 = '15'
self.cli_set(self._base_path + [interface, 'ssid', ssid])
+ self.cli_set(self._base_path + [interface, 'country-code', country])
self.cli_set(self._base_path + [interface, 'type', 'access-point'])
self.cli_set(self._base_path + [interface, 'channel', channel])
self.cli_set(self._base_path + [interface, 'mode', 'ax'])
@@ -394,13 +398,12 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
# SSID and country-code are already configured in self.setUpClass()
# Therefore, we must delete those here to check if commit will fail without it.
- self.cli_delete(wifi_cc_path)
self.cli_delete(self._base_path + [interface, 'ssid'])
# Country-Code must be set
with self.assertRaises(ConfigSessionError):
self.cli_commit()
- self.cli_set(wifi_cc_path + [country])
+ self.cli_set(self._base_path + [interface, 'country-code', country])
# SSID must be set
with self.assertRaises(ConfigSessionError):
@@ -457,6 +460,7 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
self.cli_set(bridge_path + ['member', 'interface', interface])
self.cli_set(self._base_path + [interface, 'ssid', ssid])
+ self.cli_set(self._base_path + [interface, 'country-code', country])
self.cli_set(self._base_path + [interface, 'type', 'access-point'])
self.cli_set(self._base_path + [interface, 'channel', '1'])
@@ -495,6 +499,7 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
deny_mac = ['00:00:00:00:de:01', '00:00:00:00:de:02', '00:00:00:00:de:03', '00:00:00:00:de:04']
self.cli_set(self._base_path + [interface, 'ssid', ssid])
+ self.cli_set(self._base_path + [interface, 'country-code', country])
self.cli_set(self._base_path + [interface, 'type', 'access-point'])
self.cli_set(self._base_path + [interface, 'security', 'station-address', 'mode', 'accept'])