diff --git a/autotests/testEAP-GTC/eap-user-peap-gtc.text b/autotests/testEAP-PEAP-GTC/eap-user-peap-gtc.text similarity index 100% rename from autotests/testEAP-GTC/eap-user-peap-gtc.text rename to autotests/testEAP-PEAP-GTC/eap-user-peap-gtc.text diff --git a/autotests/testEAP-GTC/hw.conf b/autotests/testEAP-PEAP-GTC/hw.conf similarity index 84% rename from autotests/testEAP-GTC/hw.conf rename to autotests/testEAP-PEAP-GTC/hw.conf index 36decf76..708317e9 100644 --- a/autotests/testEAP-GTC/hw.conf +++ b/autotests/testEAP-PEAP-GTC/hw.conf @@ -1,6 +1,6 @@ [SETUP] -num_radios=3 -start_iwd=1 +num_radios=2 +start_iwd=0 max_test_exec_interval_sec=60 tmpfs_extra_stuff=../misc/certs:eap-user-peap-gtc.text diff --git a/autotests/testEAP-GTC/peap_gtc_test.py b/autotests/testEAP-PEAP-GTC/peap_gtc_test.py similarity index 79% rename from autotests/testEAP-GTC/peap_gtc_test.py rename to autotests/testEAP-PEAP-GTC/peap_gtc_test.py index 51cfe54c..cfde2e02 100644 --- a/autotests/testEAP-GTC/peap_gtc_test.py +++ b/autotests/testEAP-PEAP-GTC/peap_gtc_test.py @@ -11,13 +11,8 @@ from iwd import NetworkType class Test(unittest.TestCase): - def test_connection_success(self): - ssid_to_connect = 'ssidEAP-PEAPv1-GTC' - - wd = IWD(True) - wd.wait(1) - - devices = wd.list_devices(); + def validate_connection(self, wd): + devices = wd.list_devices(True); self.assertIsNotNone(devices) device = devices[0] @@ -31,15 +26,9 @@ class Test(unittest.TestCase): wd.wait_for_object_condition(device, condition) ordered_networks = device.get_ordered_networks() - ordered_network = None - - for o_n in ordered_networks: - if o_n.name == ssid_to_connect: - ordered_network = o_n - break - - self.assertEqual(ordered_network.name, ssid_to_connect) + ordered_network = ordered_networks[0] + self.assertEqual(ordered_network.name, 'ssidEAP-PEAPv1-GTC') self.assertEqual(ordered_network.type, NetworkType.eap) condition = 'not obj.connected' @@ -55,6 +44,15 @@ class Test(unittest.TestCase): condition = 'not obj.connected' wd.wait_for_object_condition(ordered_network.network_object, condition) + def test_connection_success(self): + wd = IWD(True) + + try: + self.validate_connection(wd) + except: + del wd + raise + del wd @classmethod diff --git a/autotests/testEAP-GTC/ssidEAP-PEAPv1-GTC.8021x b/autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC.8021x similarity index 100% rename from autotests/testEAP-GTC/ssidEAP-PEAPv1-GTC.8021x rename to autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC.8021x diff --git a/autotests/testEAP-GTC/ssidEAP-PEAPv1-GTC.conf b/autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC.conf similarity index 100% rename from autotests/testEAP-GTC/ssidEAP-PEAPv1-GTC.conf rename to autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC.conf