diff --git a/autotests/testEAP-TLS/connection_test.py b/autotests/testEAP-TLS/connection_test.py index 6d82dda7..9b696aa4 100644 --- a/autotests/testEAP-TLS/connection_test.py +++ b/autotests/testEAP-TLS/connection_test.py @@ -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() diff --git a/autotests/testEAP-TLS/ssidEAP-TLS.conf b/autotests/testEAP-TLS/ssidEAP-TLS.conf index e1d7c6b4..b14ea423 100644 --- a/autotests/testEAP-TLS/ssidEAP-TLS.conf +++ b/autotests/testEAP-TLS/ssidEAP-TLS.conf @@ -1,3 +1,4 @@ +ctrl_interface=/var/run/hostapd hw_mode=g channel=1 ssid=ssidEAP-TLS diff --git a/autotests/testEAP-TLS/ssidEAP-TLS2.conf b/autotests/testEAP-TLS/ssidEAP-TLS2.conf index ebb0f36b..6a811deb 100644 --- a/autotests/testEAP-TLS/ssidEAP-TLS2.conf +++ b/autotests/testEAP-TLS/ssidEAP-TLS2.conf @@ -1,3 +1,4 @@ +ctrl_interface=/var/run/hostapd hw_mode=g channel=2 ssid=ssidEAP-TLS2 diff --git a/autotests/testEAP-TLS/ssidEAP-TLS3.conf b/autotests/testEAP-TLS/ssidEAP-TLS3.conf index ebbeab13..3a5f70bf 100644 --- a/autotests/testEAP-TLS/ssidEAP-TLS3.conf +++ b/autotests/testEAP-TLS/ssidEAP-TLS3.conf @@ -1,3 +1,4 @@ +ctrl_interface=/var/run/hostapd hw_mode=g channel=3 ssid=ssidEAP-TLS3