diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_radius_limiting.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_radius_limiting.py index b8654e4d7..814ebfd86 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_radius_limiting.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/rate_limiting_with_radius/test_radius_limiting.py @@ -868,7 +868,7 @@ class TestRateLimitingWithRadiusBridge(object): @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7624", name="WIFI-7624") def test_radius_server_ratelimit_maxupload_groupuser4_2g(self, lf_test, lf_tools, station_names_twog): """ - Test: check max-download ratelimit of group - user4 + Test: check max-upload ratelimit of group - user4 pytest -m "wpa2_enterprise and twog and max_upload_user4" """ profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] @@ -880,13 +880,61 @@ class TestRateLimitingWithRadiusBridge(object): eap = "TTLS" ttls_passwd = 'password' identity = 'user4' - configured = 10 + configured = 50 allure.attach(name="Max-Upload-User4", body=str(profile_data["rate-limit"])) passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, mode=mode, band=band, eap=eap, ttls_passwd=ttls_passwd, identity=identity, station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) print(passes) + if passes: + raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] + wct_obj = lf_test.wifi_capacity(instance_name="Ratelimit_Radius_group_user4", mode=mode, vlan_id=vlan, + download_rate="0bps", batch_size="1", + upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000", + raw_lines=raw_lines) + + report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) + print(kpi_data) + achieved = float("{:.2f}".format(kpi_data[1][1])) + allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for " + f"user4: {configured} Mbps \nAchieved throughput " + f"via Test: {achieved} Mbps") + lf_tools.attach_report_graphs(report_name=report_name) + print("Test Completed... Cleaning up Stations") + if float(achieved) != float(0) and (achieved <= configured): + assert True + else: + assert False, f"Expected Throughput should be less than {configured} Mbps" + else: + assert False, "EAP Connect Failed" + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.max_download_user4 + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7625", name="WIFI-7625") + def test_radius_server_ratelimit_maxdownload_groupuser4_2g(self, lf_test, lf_tools, station_names_twog): + """ + Test: check max-download ratelimit of group - user4 + pytest -m "wpa2_enterprise and twog and max_download_user4" + """ + profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"][0] + ssid_name = profile_data["ssid_name"] + mode = "BRIDGE" + vlan = 1 + security = "wpa2" + band = "twog" + eap = "TTLS" + ttls_passwd = 'password' + identity = 'user4' + configured = 10 + allure.attach(name="Max-Download-User4", body=str(profile_data["rate-limit"])) + passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, + mode=mode, band=band, + eap=eap, ttls_passwd=ttls_passwd, identity=identity, + station_name=station_names_twog, ieee80211w=0, vlan_id=vlan, cleanup=False) + print(passes) if passes: raw_lines = [["dl_rate_sel: Total Download Rate:"], ["ul_rate_sel: Per-Total Download Rate:"]] wct_obj = lf_test.wifi_capacity(instance_name="Ratelimit_Radius_group_user4", mode=mode, vlan_id=vlan, @@ -897,9 +945,9 @@ class TestRateLimitingWithRadiusBridge(object): report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] kpi_data = lf_tools.read_kpi_file(column_name=["short-description", "numeric-score"], dir_name=report_name) print(kpi_data) - achieved = float("{:.2f}".format(kpi_data[1][1])) + achieved = float("{:.2f}".format(kpi_data[0][1])) allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Download for " - f"user1: {configured} Mbps \nAchieved throughput " + f"user4: {configured} Mbps \nAchieved throughput " f"via Test: {achieved} Mbps") lf_tools.attach_report_graphs(report_name=report_name) print("Test Completed... Cleaning up Stations")