mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 09:39:25 +01:00
auto-t: added reauth to connection test
Both EAP-SIM and EAP-AKA will now attempt a reauth after the connection to exercise reset_state.
This commit is contained in:
parent
96374f47e5
commit
e2ac29b492
@ -9,9 +9,22 @@ from iwd import IWD
|
||||
from iwd import NetworkType
|
||||
from hlrauc import AuthCenter
|
||||
|
||||
from hostapd import HostapdCLI
|
||||
from hostapd import hostapd_map
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def test_connection_success(self):
|
||||
hostapd = None
|
||||
|
||||
for hostapd_if in list(hostapd_map.values()):
|
||||
hpd = HostapdCLI(hostapd_if)
|
||||
if hpd.get_config_value('ssid') == 'ssidEAP-AKA':
|
||||
hostapd = hpd
|
||||
break
|
||||
|
||||
self.assertIsNotNone(hostapd)
|
||||
|
||||
auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db')
|
||||
|
||||
wd = IWD()
|
||||
@ -46,6 +59,13 @@ class Test(unittest.TestCase):
|
||||
condition = 'obj.connected'
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
||||
hostapd.eapol_reauth(device.address)
|
||||
|
||||
wd.wait(10)
|
||||
|
||||
condition = 'obj.connected'
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
||||
device.disconnect()
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
@ -9,9 +9,20 @@ from iwd import IWD
|
||||
from iwd import NetworkType
|
||||
from hlrauc import AuthCenter
|
||||
|
||||
from hostapd import HostapdCLI
|
||||
from hostapd import hostapd_map
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def test_connection_success(self):
|
||||
hostapd = None
|
||||
|
||||
for hostapd_if in list(hostapd_map.values()):
|
||||
hpd = HostapdCLI(hostapd_if)
|
||||
if hpd.get_config_value('ssid') == 'ssidEAP-SIM':
|
||||
hostapd = hpd
|
||||
break
|
||||
|
||||
auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db')
|
||||
|
||||
wd = IWD()
|
||||
@ -46,6 +57,13 @@ class Test(unittest.TestCase):
|
||||
condition = 'obj.connected'
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
||||
hostapd.eapol_reauth(device.address)
|
||||
|
||||
wd.wait(10)
|
||||
|
||||
condition = 'obj.connected'
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
||||
device.disconnect()
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
Loading…
Reference in New Issue
Block a user