summaryrefslogtreecommitdiff
path: root/scripts/cli/test_interfaces_wireless.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-05 16:10:50 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-05 16:10:50 +0200
commit6ad15ea8bd767d5c6655d3255d0d8532c507c305 (patch)
tree57ef8acc28a585262430be2e84c167bfa198abf7 /scripts/cli/test_interfaces_wireless.py
parentb2da290cdce8d5a9cd1fd964f4583b1a2c34c9f2 (diff)
downloadvyos-1x-6ad15ea8bd767d5c6655d3255d0d8532c507c305.tar.gz
vyos-1x-6ad15ea8bd767d5c6655d3255d0d8532c507c305.zip
wifi: add basic interface test
Diffstat (limited to 'scripts/cli/test_interfaces_wireless.py')
-rwxr-xr-xscripts/cli/test_interfaces_wireless.py26
1 files changed, 21 insertions, 5 deletions
diff --git a/scripts/cli/test_interfaces_wireless.py b/scripts/cli/test_interfaces_wireless.py
index 8693f77e2..6edff78b3 100755
--- a/scripts/cli/test_interfaces_wireless.py
+++ b/scripts/cli/test_interfaces_wireless.py
@@ -24,13 +24,29 @@ class WirelessInterfaceTest(BasicInterfaceTest.BaseTest):
super().setUp()
self._base_path = ['interfaces', 'wireless']
- self._interfaces = ['wlan0', 'wlan1', 'wlan10', 'wlan11']
self._options = {
- 'wlan0': ['physical-device phy0'],
- 'wlan1': ['physical-device phy0'],
- 'wlan10': ['physical-device phy1'],
- 'wlan11': ['physical-device phy1'],
+ 'wlan0': ['physical-device phy0', 'ssid VyOS-WIFI-0',
+ 'type station', 'address 192.0.2.1/30'],
+ 'wlan1': ['physical-device phy0', 'ssid VyOS-WIFI-1',
+ 'type access-point', 'address 192.0.2.5/30', 'channel 0'],
+ 'wlan10': ['physical-device phy1', 'ssid VyOS-WIFI-2',
+ 'type station', 'address 192.0.2.9/30'],
+ 'wlan11': ['physical-device phy1', 'ssid VyOS-WIFI-3',
+ 'type access-point', 'address 192.0.2.13/30', 'channel 0'],
}
+ self._interfaces = list(self._options)
+ self.session.set(['system', 'wifi-regulatory-domain', 'SE'])
+
+ def test_wifi_client(self):
+ """ test creation of a wireless station """
+ for intf in self._interfaces:
+ # prepare interfaces
+ for option in self._options.get(intf, []):
+ self.session.set(self._base_path + [intf] + option.split())
+
+ # commit changes
+ self.session.commit()
+
if __name__ == '__main__':