mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 02:19:26 +01:00
auto-t: add EAD autotest
This commit is contained in:
parent
9897efe75c
commit
df0b64f8d0
35
autotests/testEAD/connection_test.py
Normal file
35
autotests/testEAD/connection_test.py
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
import sys
|
||||||
|
|
||||||
|
sys.path.append('../util')
|
||||||
|
from iwd import IWD
|
||||||
|
from config import ctx
|
||||||
|
|
||||||
|
from ead import EAD
|
||||||
|
|
||||||
|
class Test(unittest.TestCase):
|
||||||
|
def test_connection_success(self):
|
||||||
|
ctx.start_process(['ead', '-i', 'eth1', '-d'])
|
||||||
|
|
||||||
|
ead = EAD()
|
||||||
|
|
||||||
|
adapter = ead.list_adapters(1)[0]
|
||||||
|
|
||||||
|
condition = 'obj.connected == True'
|
||||||
|
ead.wait_for_object_condition(adapter, condition)
|
||||||
|
|
||||||
|
condition = 'obj.authenticated == True'
|
||||||
|
ead.wait_for_object_condition(adapter, condition)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def setUpClass(cls):
|
||||||
|
IWD.copy_to_storage('default.8021x', storage_dir='/var/lib/ead')
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def tearDownClass(cls):
|
||||||
|
IWD.clear_storage()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main(exit=True)
|
7
autotests/testEAD/default.8021x
Normal file
7
autotests/testEAD/default.8021x
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Security]
|
||||||
|
EAP-Method=MSCHAPV2
|
||||||
|
EAP-Identity=domain\\User
|
||||||
|
EAP-Password=Password
|
||||||
|
|
||||||
|
[Settings]
|
||||||
|
AutoConnect=false
|
6
autotests/testEAD/hw.conf
Normal file
6
autotests/testEAD/hw.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[SETUP]
|
||||||
|
num_radios=0
|
||||||
|
start_iwd=0
|
||||||
|
|
||||||
|
[HOSTAPD]
|
||||||
|
radius_server=wired.conf
|
17
autotests/testEAD/wired.conf
Normal file
17
autotests/testEAD/wired.conf
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
interface=eth0
|
||||||
|
driver=wired
|
||||||
|
logger_stdout=-1
|
||||||
|
logger_stdout_level=1
|
||||||
|
|
||||||
|
ieee8021x=1
|
||||||
|
eap_reauth_period=3600
|
||||||
|
|
||||||
|
use_pae_group_addr=1
|
||||||
|
|
||||||
|
nas_identifier=ap.example.com
|
||||||
|
|
||||||
|
radius_server_clients=/tmp/certs/radius-clients.text
|
||||||
|
radius_server_auth_port=1812
|
||||||
|
|
||||||
|
eap_user_file=/tmp/secrets/eap-user-mschapv2.text
|
||||||
|
eap_server=1
|
Loading…
Reference in New Issue
Block a user