2017-10-31 23:03:00 +01:00
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
|
|
import unittest
|
|
|
|
import sys
|
|
|
|
|
|
|
|
sys.path.append('../util')
|
|
|
|
import iwd
|
|
|
|
import validation
|
2019-10-24 19:53:23 +02:00
|
|
|
from validation import TestConnectAutoConnect
|
2017-10-31 23:03:00 +01:00
|
|
|
from iwd import IWD
|
|
|
|
|
|
|
|
class Test8021xNetwork(unittest.TestCase):
|
|
|
|
'''
|
2024-11-07 14:26:12 +01:00
|
|
|
The below test cases excesise the following connection scenarios:
|
2017-10-31 23:03:00 +01:00
|
|
|
|
|
|
|
Network config is
|
2019-10-24 19:53:23 +02:00
|
|
|
present at start time: Connect: AutoConnect: Result:
|
2017-10-31 23:03:00 +01:00
|
|
|
--------------------------------------------------------------------------
|
|
|
|
False True NotConfiguredEx is thrown
|
|
|
|
True True Connection succeeds
|
2018-04-26 11:29:29 +02:00
|
|
|
True - EAP method in True NotSupportedEx is thrown
|
2017-10-31 23:03:00 +01:00
|
|
|
config file is not
|
|
|
|
supported by IWD
|
|
|
|
'''
|
|
|
|
def test_8021x(self):
|
2019-10-24 19:53:23 +02:00
|
|
|
tca = TestConnectAutoConnect()
|
2017-10-31 23:03:00 +01:00
|
|
|
tca.validate('ssidEAP-TLS', True, iwd.NotConfiguredEx)
|
|
|
|
|
|
|
|
IWD.copy_to_storage('ssidEAP-TLS.8021x')
|
|
|
|
|
|
|
|
tca.validate('ssidEAP-TLS', True)
|
|
|
|
|
|
|
|
IWD.clear_storage()
|
|
|
|
IWD.copy_to_storage('ssidEAP-Other.8021x')
|
|
|
|
|
2018-04-26 11:29:29 +02:00
|
|
|
tca.validate('ssidEAP-Other', False, iwd.NotSupportedEx)
|
2017-10-31 23:03:00 +01:00
|
|
|
|
|
|
|
IWD.clear_storage()
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main(exit=True)
|