mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
auto-t: update testEAP-TLS to use HostapdCLI
This test did not use the updated HostapdCLI where you can specify a config file rather than iterate hostapd list.
This commit is contained in:
parent
14df50a0ab
commit
4fcb6c3cc6
@ -9,23 +9,18 @@ from iwd import IWD
|
||||
from iwd import PSKAgent
|
||||
from iwd import NetworkType
|
||||
import testutil
|
||||
import hostapd
|
||||
from hostapd import HostapdCLI
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def do_test_connection_success(self, ssid, passphrase=None):
|
||||
hapd = HostapdCLI(config=ssid + '.conf')
|
||||
wd = IWD()
|
||||
|
||||
if passphrase:
|
||||
psk_agent = PSKAgent(passphrase)
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
hostapd_ifname = None
|
||||
for ifname in hostapd.hostapd_map:
|
||||
if ssid + '.conf' in hostapd.hostapd_map[ifname].config:
|
||||
hostapd_ifname = ifname
|
||||
break
|
||||
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
|
||||
@ -52,7 +47,7 @@ class Test(unittest.TestCase):
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
||||
testutil.test_iface_operstate()
|
||||
testutil.test_ifaces_connected(hostapd_ifname, device.name)
|
||||
testutil.test_ifaces_connected(hapd.ifname, device.name)
|
||||
|
||||
device.disconnect()
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
ctrl_interface=/var/run/hostapd
|
||||
hw_mode=g
|
||||
channel=1
|
||||
ssid=ssidEAP-TLS
|
||||
|
@ -1,3 +1,4 @@
|
||||
ctrl_interface=/var/run/hostapd
|
||||
hw_mode=g
|
||||
channel=2
|
||||
ssid=ssidEAP-TLS2
|
||||
|
@ -1,3 +1,4 @@
|
||||
ctrl_interface=/var/run/hostapd
|
||||
hw_mode=g
|
||||
channel=3
|
||||
ssid=ssidEAP-TLS3
|
||||
|
Loading…
Reference in New Issue
Block a user