3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00

auto-t: add EAD autotest

This commit is contained in:
James Prestwood 2020-09-17 14:32:47 -07:00 committed by Denis Kenzior
parent 9897efe75c
commit df0b64f8d0
4 changed files with 65 additions and 0 deletions

View 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)

View File

@ -0,0 +1,7 @@
[Security]
EAP-Method=MSCHAPV2
EAP-Identity=domain\\User
EAP-Password=Password
[Settings]
AutoConnect=false

View File

@ -0,0 +1,6 @@
[SETUP]
num_radios=0
start_iwd=0
[HOSTAPD]
radius_server=wired.conf

View 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