commit 4fcb6c3cc62fd2b70b2829877d39e0ecdffa39bb
parent 14df50a0abd4fd9a3cc3b35c16a0ea6a8cb852f2
Author: James Prestwood <prestwoj@gmail.com>
Date: Mon, 28 Oct 2019 12:52:01 -0700
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.
Diffstat:
4 files changed, 6 insertions(+), 8 deletions(-)
diff --git 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
@@ -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
@@ -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
@@ -1,3 +1,4 @@
+ctrl_interface=/var/run/hostapd
hw_mode=g
channel=3
ssid=ssidEAP-TLS3