From 7c4fed9926ff955ab042c3320a6db4e64d64ce21 Mon Sep 17 00:00:00 2001 From: saurabh Date: Mon, 13 Sep 2021 20:19:27 +0530 Subject: [PATCH] Added Wpa3 Security Bridge Mode Signed-off-by: saurabh --- .../wpa3_security/__init__.py | 0 .../wpa3_security/test_bridge_mode.py | 71 +++++++++++++++++++ .../wpa3_security/test_nat_mode.py | 0 .../wpa3_security/test_vlan_mode.py | 0 4 files changed, 71 insertions(+) create mode 100644 tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/__init__.py create mode 100644 tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/test_bridge_mode.py create mode 100644 tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/test_nat_mode.py create mode 100644 tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/test_vlan_mode.py diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/__init__.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/test_bridge_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/test_bridge_mode.py new file mode 100644 index 000000000..216913dc0 --- /dev/null +++ b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/test_bridge_mode.py @@ -0,0 +1,71 @@ +""" + Dual Band Performance Test : BRIDGE Mode + pytest -m "performance and dual_band_test and bridge" + + +""" + +import os +import allure +import pytest + +pytestmark = [pytest.mark.performance, pytest.mark.dual_band_test, pytest.mark.bridge, pytest.mark.sss, + pytest.mark.single_station_dual_band_throughput]# pytest.mark.usefixtures("setup_test_run")] + +setup_params_general = { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_personal": [ + {"ssid_name": "ssid_wpa3_personal_dual_band", "appliedRadios": ["2G", "5G"], "security_key": "something"} + ]}, + "rf": {}, + "radius": False +} + + +@pytest.mark.dual_band_test +@pytest.mark.wifi5 +@pytest.mark.wifi6 +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestDualbandPerformanceBridge(object): + """ + pytest -m "performance and dual_band_test and bridge and wpa3_personal and twog and fiveg" + """ + + @pytest.mark.wpa3_personal + @pytest.mark.twog + @pytest.mark.fiveg + def test_client_wpa3_personal_wpa3_vlan(self, get_vif_state, lf_tools, + create_lanforge_chamberview_dut, lf_test, get_configuration): + profile_data = setup_params_general["ssid_modes"]["wpa3_personal"] + ssid_2G = profile_data[0]["ssid_name"] + ssid_5G = profile_data[0]["ssid_name"] + dut_name = create_lanforge_chamberview_dut + mode = "BRIDGE" + vlan = 1 + print(lf_tools.dut_idx_mapping) + dut_5g = "" + dut_2g = "" + for i in lf_tools.dut_idx_mapping: + if lf_tools.dut_idx_mapping[i][3] == "5G": + dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + print(dut_5g) + if lf_tools.dut_idx_mapping[i][3] == "2G": + dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + print(dut_2g) + if ssid_2G and ssid_5G not in get_vif_state: + allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state)) + pytest.xfail("SSID's NOT AVAILABLE IN VIF STATE") + + dbpt_obj = lf_test.dualbandperformancetest(mode=mode, ssid_2G=ssid_2G, ssid_5G=ssid_5G, + instance_name="dbp_instance_wpa3p_BRIDGE_p", + vlan_id=vlan, dut_5g=dut_5g, dut_2g=dut_2g) + report_name = dbpt_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dual Band Performance Wpa3 Personal Test") + assert True \ No newline at end of file diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/test_nat_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/test_nat_mode.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/test_vlan_mode.py b/tests/e2e/basic/performance_tests/dual_band_performance_test/wpa3_security/test_vlan_mode.py new file mode 100644 index 000000000..e69de29bb