mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-05-02 14:17:24 +02:00
auto-t: TTLS-MSCHAPv2 - remove iwd instance on failure
This commit is contained in:
parent
bda956f2b2
commit
664cf5a368
@ -15,7 +15,7 @@ from hostapd import hostapd_map
|
|||||||
|
|
||||||
class Test(unittest.TestCase):
|
class Test(unittest.TestCase):
|
||||||
|
|
||||||
def test_connection_success(self):
|
def validate_connection(self, wd):
|
||||||
hostapd = None
|
hostapd = None
|
||||||
|
|
||||||
for hostapd_if in list(hostapd_map.values()):
|
for hostapd_if in list(hostapd_map.values()):
|
||||||
@ -26,8 +26,6 @@ class Test(unittest.TestCase):
|
|||||||
|
|
||||||
self.assertIsNotNone(hostapd)
|
self.assertIsNotNone(hostapd)
|
||||||
|
|
||||||
wd = IWD(True)
|
|
||||||
|
|
||||||
psk_agent = PSKAgent('abc', ('domain\\user', 'testpasswd'))
|
psk_agent = PSKAgent('abc', ('domain\\user', 'testpasswd'))
|
||||||
wd.register_psk_agent(psk_agent)
|
wd.register_psk_agent(psk_agent)
|
||||||
|
|
||||||
@ -72,7 +70,13 @@ class Test(unittest.TestCase):
|
|||||||
|
|
||||||
wd.unregister_psk_agent(psk_agent)
|
wd.unregister_psk_agent(psk_agent)
|
||||||
|
|
||||||
del wd
|
def test_connection_success(self):
|
||||||
|
wd = IWD(True)
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.validate_connection(wd)
|
||||||
|
finally:
|
||||||
|
del wd
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
@ -15,7 +15,7 @@ from hostapd import hostapd_map
|
|||||||
|
|
||||||
class Test(unittest.TestCase):
|
class Test(unittest.TestCase):
|
||||||
|
|
||||||
def test_connection_failure(self):
|
def validate_connection(self, wd):
|
||||||
hostapd = None
|
hostapd = None
|
||||||
|
|
||||||
for hostapd_if in list(hostapd_map.values()):
|
for hostapd_if in list(hostapd_map.values()):
|
||||||
@ -26,8 +26,6 @@ class Test(unittest.TestCase):
|
|||||||
|
|
||||||
self.assertIsNotNone(hostapd)
|
self.assertIsNotNone(hostapd)
|
||||||
|
|
||||||
wd = IWD(True)
|
|
||||||
|
|
||||||
psk_agent = PSKAgent('abc', ('user', 'incorrect_password'))
|
psk_agent = PSKAgent('abc', ('user', 'incorrect_password'))
|
||||||
wd.register_psk_agent(psk_agent)
|
wd.register_psk_agent(psk_agent)
|
||||||
|
|
||||||
@ -55,7 +53,13 @@ class Test(unittest.TestCase):
|
|||||||
|
|
||||||
wd.unregister_psk_agent(psk_agent)
|
wd.unregister_psk_agent(psk_agent)
|
||||||
|
|
||||||
del wd
|
def test_connection_success(self):
|
||||||
|
wd = IWD(True)
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.validate_connection(wd)
|
||||||
|
finally:
|
||||||
|
del wd
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user