3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

auto-t: make testSAQuery more reliable

First, looking for DeviceState.connected gives a much better indication
if we are actually connected vs the connected property on the network
object. Second, its good practice to also check that hostapd sees that
the station is connected.
This commit is contained in:
James Prestwood 2020-07-14 11:49:08 -07:00 committed by Denis Kenzior
parent 933be89812
commit f85fcf2f21

View File

@ -13,7 +13,7 @@ from hostapd import HostapdCLI, hostapd_map
class Test(unittest.TestCase):
def test_connection_success(self):
hostapd = HostapdCLI(list(hostapd_map.values())[0])
hostapd = HostapdCLI(config='ssidCCMP.conf')
wd = IWD()
@ -53,8 +53,10 @@ class Test(unittest.TestCase):
# IWD should now try and re-connect to the AP
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
hostapd.wait_for_event('AP-STA-CONNECTED')
device.disconnect()