mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-10-29 10:02:26 +00:00
Wifi 7621 (#538)
* ratelimiting with radius max-download of group user2 added Signed-off-by: anil-tegala <anil.tegala@candelatech.com> * pass/fail info added to allure report Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
This commit is contained in:
committed by
GitHub
parent
b294c7bcd2
commit
be26509845
@@ -596,6 +596,7 @@ 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]))
|
||||
allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for "
|
||||
f"user1: {configured} Mbps \nAchieved throughput "
|
||||
@@ -643,6 +644,7 @@ 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[0][1]))
|
||||
allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Download for "
|
||||
f"user1: {configured} Mbps \nAchieved throughput "
|
||||
@@ -690,6 +692,7 @@ 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]))
|
||||
allure.attach(name="Check PASS/FAIL information", body=f"Configured WISPr Bandwidth for Max Upload for "
|
||||
f"user2: {configured} Mbps \nAchieved throughput "
|
||||
@@ -700,5 +703,53 @@ class TestRateLimitingWithRadiusBridge(object):
|
||||
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_user2
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7621", name="WIFI-7621")
|
||||
def test_radius_server_ratelimit_maxdownload_groupuser2_2g(self, lf_test, lf_tools, station_names_twog):
|
||||
"""
|
||||
Test: check max-download ratelimit of group - user2
|
||||
pytest -m "wpa2_enterprise and twog and max_download_user2"
|
||||
"""
|
||||
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 = 'user2'
|
||||
configured = 20
|
||||
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)
|
||||
allure.attach(name="Max-Download-User2", body=str(profile_data["rate-limit"]))
|
||||
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_user1", 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 Upload for "
|
||||
f"user2: {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"
|
||||
Reference in New Issue
Block a user