mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-29 05:39:24 +01:00
auto-t: Fix event order
In addition, use the conditional wait for the expected number of known networks
This commit is contained in:
parent
000b533194
commit
57ce53f1ac
@ -52,7 +52,8 @@ class Test(unittest.TestCase):
|
||||
condition = 'obj.state == DeviceState.disconnected'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
self.assertEqual(len(wd.list_known_networks()), 1)
|
||||
condition = 'len(obj.list_known_networks()) == 1'
|
||||
wd.wait_for_object_condition(wd, condition)
|
||||
|
||||
condition = 'obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
@ -74,9 +75,6 @@ class Test(unittest.TestCase):
|
||||
testutil.test_ifaces_connected(device.name, hapd_hotspot.ifname)
|
||||
|
||||
os.remove('/var/lib/iwd/hotspot/autoconnect.conf')
|
||||
IWD.copy_to_storage('ssidWPA2-1.psk')
|
||||
|
||||
self.assertEqual(len(wd.list_known_networks()), 1)
|
||||
|
||||
#
|
||||
# make sure removal of hotspot conf file resulted in disconnect
|
||||
@ -84,6 +82,11 @@ class Test(unittest.TestCase):
|
||||
condition = 'obj.state == DeviceState.disconnected'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
IWD.copy_to_storage('ssidWPA2-1.psk')
|
||||
|
||||
condition = 'len(obj.list_known_networks()) == 1'
|
||||
wd.wait_for_object_condition(wd, condition)
|
||||
|
||||
condition = 'obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user