mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 19:02:34 +01:00
auto-t: add hotspot to testKnownNetworks
This commit is contained in:
parent
0846f76703
commit
0f55b0023d
@ -40,30 +40,31 @@ class Test(unittest.TestCase):
|
|||||||
def list_removal_and_addition(self, wd):
|
def list_removal_and_addition(self, wd):
|
||||||
|
|
||||||
known_networks = wd.list_known_networks()
|
known_networks = wd.list_known_networks()
|
||||||
self.assertEqual(len(known_networks), 3)
|
self.assertEqual(len(known_networks), 4)
|
||||||
|
|
||||||
for network in known_networks:
|
for network in known_networks:
|
||||||
if network.name == 'ssidTKIP':
|
if network.name == 'ssidTKIP':
|
||||||
network.forget()
|
network.forget()
|
||||||
|
|
||||||
known_networks = wd.list_known_networks()
|
known_networks = wd.list_known_networks()
|
||||||
self.assertEqual(len(known_networks), 2)
|
self.assertEqual(len(known_networks), 3)
|
||||||
|
|
||||||
self.connect_to_new_network(wd)
|
self.connect_to_new_network(wd)
|
||||||
|
|
||||||
known_networks = wd.list_known_networks()
|
known_networks = wd.list_known_networks()
|
||||||
self.assertEqual(len(known_networks), 3)
|
self.assertEqual(len(known_networks), 4)
|
||||||
|
|
||||||
IWD.copy_to_storage('known_networks/ssidPSK.psk')
|
IWD.copy_to_storage('known_networks/ssidPSK.psk')
|
||||||
condition = 'len(obj.list_known_networks()) == 4'
|
condition = 'len(obj.list_known_networks()) == 5'
|
||||||
wd.wait_for_object_condition(wd, condition, 1)
|
wd.wait_for_object_condition(wd, condition, 1)
|
||||||
|
|
||||||
expected = ['ssidNew', 'ssidOpen', 'ssidPSK', 'ssidEAP-TLS']
|
expected = ['ssidNew', 'ssidOpen', 'ssidPSK', 'ssidEAP-TLS',
|
||||||
|
'Hotspot Network']
|
||||||
self.assertEqual({n.name for n in wd.list_known_networks()},
|
self.assertEqual({n.name for n in wd.list_known_networks()},
|
||||||
set(expected))
|
set(expected))
|
||||||
|
|
||||||
IWD.remove_from_storage('ssidPSK.psk')
|
IWD.remove_from_storage('ssidPSK.psk')
|
||||||
condition = 'len(obj.list_known_networks()) == 3'
|
condition = 'len(obj.list_known_networks()) == 4'
|
||||||
wd.wait_for_object_condition(wd, condition, 1)
|
wd.wait_for_object_condition(wd, condition, 1)
|
||||||
|
|
||||||
for net in known_networks:
|
for net in known_networks:
|
||||||
@ -82,6 +83,7 @@ class Test(unittest.TestCase):
|
|||||||
IWD.copy_to_storage('known_networks/ssidOpen.open')
|
IWD.copy_to_storage('known_networks/ssidOpen.open')
|
||||||
IWD.copy_to_storage('known_networks/ssidTKIP.psk')
|
IWD.copy_to_storage('known_networks/ssidTKIP.psk')
|
||||||
IWD.copy_to_storage('known_networks/ssidEAP-TLS.8021x')
|
IWD.copy_to_storage('known_networks/ssidEAP-TLS.8021x')
|
||||||
|
IWD.copy_to_hotspot('known_networks/hotspot.conf')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
|
11
autotests/testKnownNetworks/known_networks/hotspot.conf
Normal file
11
autotests/testKnownNetworks/known_networks/hotspot.conf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Security]
|
||||||
|
EAP-Method=TTLS
|
||||||
|
EAP-Identity=anonymous@example.com
|
||||||
|
EAP-TTLS-Phase2-Method=Tunneled-MSCHAPv2
|
||||||
|
|
||||||
|
[Hotspot]
|
||||||
|
NAIRealmNames=realm1.random.net,example.com
|
||||||
|
Name=Hotspot Network
|
||||||
|
|
||||||
|
[Settings]
|
||||||
|
Autoconnect=False
|
Loading…
Reference in New Issue
Block a user