From 9233fd3d3d6c75652b6d81b283a5bd6a625f92c4 Mon Sep 17 00:00:00 2001 From: shivamcandela Date: Fri, 3 Sep 2021 01:56:39 +0530 Subject: [PATCH] wpa3 eap ttls fix for 1.x sanity and 2.x support for wpa3 added Signed-off-by: shivamcandela --- tests/configuration.py | 2 +- .../test_enterprise_ttls.py | 4 ++-- .../test_enterprise_ttls.py | 4 ++-- .../test_enterprise_ttls.py | 4 ++-- tests/fixtures_2x.py | 19 +++++++++++++++++++ 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/tests/configuration.py b/tests/configuration.py index 0ae11b148..6114bce47 100644 --- a/tests/configuration.py +++ b/tests/configuration.py @@ -562,7 +562,7 @@ RADIUS_SERVER_DATA = { RADIUS_ACCOUNTING_DATA = { "ip": "10.10.10.72", - "port": 1812, + "port": 1813, "secret": "testing123", "user": "user", "password": "password", diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py index b3224f0ad..ca795cbeb 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py @@ -173,7 +173,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, + mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", eap=eap, ttls_passwd=ttls_passwd, identity=identity, station_name=station_names_twog, vlan_id=vlan) @@ -200,7 +200,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object): allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, + mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", eap=eap, ttls_passwd=ttls_passwd, identity=identity, station_name=station_names_fiveg, vlan_id=vlan) diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py index 463030dfb..9bc16b373 100644 --- a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py +++ b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py @@ -148,7 +148,7 @@ class TestNATModeEnterpriseTTLSSuiteOne(object): allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, + mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", eap=eap, ttls_passwd=ttls_passwd, identity=identity, station_name=station_names_twog, vlan_id=vlan) @@ -171,7 +171,7 @@ class TestNATModeEnterpriseTTLSSuiteOne(object): allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, + mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", eap=eap, ttls_passwd=ttls_passwd, identity=identity, station_name=station_names_fiveg, vlan_id=vlan) diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_ttls.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_ttls.py index 1859ffc22..99da64ff5 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_ttls.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_enterprise_ttls.py @@ -153,7 +153,7 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object): allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, + mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", eap=eap, ttls_passwd=ttls_passwd, identity=identity, station_name=station_names_twog, vlan_id=vlan) @@ -177,7 +177,7 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object): allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) pytest.xfail("SSID NOT AVAILABLE IN VIF STATE") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, - mode=mode, band=band, ieee80211w=2, + mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", eap=eap, ttls_passwd=ttls_passwd, identity=identity, station_name=station_names_fiveg, vlan_id=vlan) diff --git a/tests/fixtures_2x.py b/tests/fixtures_2x.py index 7db6542e7..564025eb6 100644 --- a/tests/fixtures_2x.py +++ b/tests/fixtures_2x.py @@ -211,6 +211,25 @@ class Fixtures_2x: except Exception as e: print(e) test_cases["wpa2_personal"] = False + if mode == "wpa3_enterprise": + for j in profile_data["ssid"][mode]: + if mode in get_markers.keys() and get_markers[mode]: + try: + if j["appliedRadios"].__contains__("2G"): + lf_dut_data.append(j) + if j["appliedRadios"].__contains__("5G"): + lf_dut_data.append(j) + j["appliedRadios"] = list(set(j["appliedRadios"])) + j['security'] = 'wpa3' + RADIUS_SERVER_DATA = radius_info + RADIUS_ACCOUNTING_DATA = radius_accounting_info + creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j, radius=True, + radius_auth_data=RADIUS_SERVER_DATA, + radius_accounting_data=RADIUS_ACCOUNTING_DATA) + test_cases["wpa_2g"] = True + except Exception as e: + print(e) + test_cases["wpa2_personal"] = False ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="2.x") connected, latest, active = ap_ssh.get_ucentral_status() if connected == False: