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 8e240f10e..c98250917 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 @@ -754,7 +754,6 @@ class TestRateLimitingWithRadiusBridge(object): else: assert False, "EAP Connect Failed" - @pytest.mark.wpa2_enterprise @pytest.mark.twog @pytest.mark.max_upload_user3 @@ -800,4 +799,53 @@ class TestRateLimitingWithRadiusBridge(object): else: assert False, f"Expected Throughput should be less than {configured} Mbps" else: - assert False, "EAP Connect Failed" \ No newline at end of file + assert False, "EAP Connect Failed" + + @pytest.mark.wpa2_enterprise + @pytest.mark.twog + @pytest.mark.max_download_user3 + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7623", name="WIFI-7623") + def test_radius_server_ratelimit_maxdownload_groupuser3_2g(self, lf_test, lf_tools, station_names_twog): + """ + Test: check max-download ratelimit of group - user3 + pytest -m "wpa2_enterprise and twog and max_download_user3" + """ + 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 = 'user3' + configured = 10 + allure.attach(name="Max-Download-User3", 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_user3", mode=mode, vlan_id=vlan, + download_rate="1Gbps", batch_size="1", + upload_rate="0bps", 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[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"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" + \ No newline at end of file