mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-02 03:48:09 +00:00
- added fiveg and twog testcases
- changed vlan fixture Signed-off-by: sushant <sushant.bawiskar@candelatech.com>
This commit is contained in:
@@ -529,20 +529,23 @@ def create_vlan(request, testbed, get_configuration):
|
||||
upstream_resources = upstream_port.split(".")[0] + "." + upstream_port.split(".")[1]
|
||||
|
||||
for vlan in vlan_list:
|
||||
chamberview_obj.raw_line.append(["profile_link " + upstream_resources + " vlan-100 1 NA "
|
||||
chamberview_obj.raw_line.append(["profile_link " + upstream_resources + " Vlan 1 NA "
|
||||
+ "NA " + upstream_port.split(".")[2] + ",AUTO -1 " + str(vlan)])
|
||||
|
||||
chamberview_obj.Chamber_View()
|
||||
port_resource = upstream_resources.split(".")
|
||||
|
||||
try:
|
||||
ip = chamberview_obj.json_get("/port/" + port_resource[0] + "/" + port_resource[1] +
|
||||
"/" + upstream_port.split(".")[2] + "." + str(vlan))["interface"]["ip"]
|
||||
if ip:
|
||||
yield vlan_list, ip
|
||||
except Exception as e:
|
||||
print(e)
|
||||
yield False
|
||||
yield vlan_list
|
||||
else:
|
||||
yield False
|
||||
# try:
|
||||
# ip = chamberview_obj.json_get("/port/" + port_resource[0] + "/" + port_resource[1] +
|
||||
# "/" + upstream_port.split(".")[2] + "." + str(vlan))["interface"]["ip"]
|
||||
# if ip:
|
||||
# yield vlan_list, ip
|
||||
# except Exception as e:
|
||||
# print(e)
|
||||
# yield False
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
||||
@@ -0,0 +1,370 @@
|
||||
"""
|
||||
Create VLAN ,connect stations and flow traffic through it : vlan Mode
|
||||
pytest -m TestVlanConfigRadioFiveg
|
||||
"""
|
||||
|
||||
import time
|
||||
import allure
|
||||
import pytest
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"], "vlan": 100}],
|
||||
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something", "vlan": 125}],
|
||||
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something", "vlan": 200}],
|
||||
|
||||
"wpa_wpa2_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something", "vlan": 150}],
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
"create_vlan",
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.TestVlanConfigRadioFiveg
|
||||
class TestVlanConfigFivegRadio(object):
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.valid_client_ip_wpa_fiveg # wifi-2169
|
||||
@allure.testcase(name="test_station_ip_wpa_ssid_5g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2169")
|
||||
def test_station_ip_wpa_ssid_5g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools,
|
||||
get_vlan_list, update_report, station_names_fiveg,
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, wpa, fiveg
|
||||
pytest -m valid_client_ip_wpa_fiveg
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 125
|
||||
lanforge_data = get_configuration["traffic_generator"]["details"]
|
||||
upstream_port = lanforge_data["upstream"]
|
||||
print("upstream_port: ",upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
vlan_list = get_vlan_list
|
||||
print(vlan_list)
|
||||
lf_test.Client_disconnect(station_names_fiveg)
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan, cleanup=False)
|
||||
if result:
|
||||
station_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
station_names_fiveg[0])["interface"]["ip"]
|
||||
vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
|
||||
station_ip = station_ip.split(".")
|
||||
vlan_ip = vlan_ip.split(".")
|
||||
|
||||
print(station_ip[:2], vlan_ip[:2])
|
||||
for i, j in zip(station_ip[:2], vlan_ip[:2]):
|
||||
if i != j:
|
||||
assert False
|
||||
|
||||
vlan_list = [int(i) for i in vlan_list]
|
||||
if int(vlan) in vlan_list:
|
||||
print("station got IP as per VLAN. Test passed")
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
else:
|
||||
assert False
|
||||
try:
|
||||
lf_test.Client_disconnect(station_names_fiveg)
|
||||
except:
|
||||
pass
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.valid_client_ip_wpa2_fiveg # wifi-2157
|
||||
@allure.testcase(name="test_station_ip_wpa2_ssid_5g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2157")
|
||||
def test_station_ip_wpa2_ssid_5g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools,
|
||||
update_report, station_names_fiveg,
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, wpa2, fiveg
|
||||
pytest -m valid_client_ip_wpa2_fiveg
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 200
|
||||
lanforge_data = get_configuration["traffic_generator"]["details"]
|
||||
upstream_port = lanforge_data["upstream"]
|
||||
port_resources = upstream_port.split(".")
|
||||
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan, cleanup=False)
|
||||
if result:
|
||||
station_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
station_names_fiveg[0])["interface"]["ip"]
|
||||
vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
|
||||
station_ip = station_ip.split(".")
|
||||
vlan_ip = vlan_ip.split(".")
|
||||
|
||||
print(station_ip[:2], vlan_ip[:2])
|
||||
for i, j in zip(station_ip[:2], vlan_ip[:2]):
|
||||
if i != j:
|
||||
assert False
|
||||
|
||||
print("station got IP as per VLAN. Test passed")
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
try:
|
||||
lf_test.Client_disconnect(station_names_fiveg)
|
||||
except:
|
||||
pass
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.disable_vlan_fiveg # wifi-2174
|
||||
@allure.testcase(name="test_disable_vlan_wpa2_ssid_5g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2174")
|
||||
def test_disable_vlan_wpa2_ssid_5g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools,
|
||||
update_report, station_names_fiveg,
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, wpa2, fiveg
|
||||
pytest -m disable_vlan_fiveg
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 200
|
||||
lanforge_data = get_configuration["traffic_generator"]["details"]
|
||||
upstream_port = lanforge_data["upstream"]
|
||||
port_resources = upstream_port.split(".")
|
||||
|
||||
vlan_alias = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
port_resources[2] + "." + str(vlan))["interface"]["alias"]
|
||||
|
||||
req_url = "cli-json/set_port"
|
||||
lf_tools.json_post(req_url, port_resources[0], port_resources[1], vlan_alias, 1, 8388608)
|
||||
down = False
|
||||
while not down:
|
||||
down = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
port_resources[2] + "." + str(vlan))["interface"]["down"]
|
||||
time.sleep(1)
|
||||
|
||||
passes = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if not passes:
|
||||
station_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
station_names_fiveg[0])["interface"]["ip"]
|
||||
print("station did not get an IP. Test passed")
|
||||
print("station ip: ", station_ip)
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
try:
|
||||
lf_test.Client_disconnect(station_names_fiveg)
|
||||
except:
|
||||
pass
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.valid_client_ip_open_fiveg # wifi-2161
|
||||
@allure.testcase(name="test_station_ip_open_ssid_5g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2161")
|
||||
def test_station_ip_open_ssid_5g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools,
|
||||
get_vlan_list, update_report, station_names_fiveg,
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, open, fiveg
|
||||
pytest -m valid_client_ip_open_fiveg
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = "[BLANK]"
|
||||
security = "open"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 100
|
||||
lanforge_data = get_configuration["traffic_generator"]["details"]
|
||||
upstream_port = lanforge_data["upstream"]
|
||||
port_resources = upstream_port.split(".")
|
||||
vlan_list = get_vlan_list
|
||||
print("vlan_list", vlan_list)
|
||||
lf_test.Client_disconnect(station_names_fiveg)
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan, cleanup=False)
|
||||
if result:
|
||||
station_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
station_names_fiveg[0])["interface"]["ip"]
|
||||
vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
|
||||
station_ip = station_ip.split(".")
|
||||
vlan_ip = vlan_ip.split(".")
|
||||
|
||||
print(station_ip[:2], vlan_ip[:2])
|
||||
for i, j in zip(station_ip[:2], vlan_ip[:2]):
|
||||
if i != j:
|
||||
assert False
|
||||
|
||||
vlan_list = [int(i) for i in vlan_list]
|
||||
if int(vlan) in vlan_list:
|
||||
print("station got IP as per VLAN. Test passed")
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
else:
|
||||
assert False
|
||||
try:
|
||||
lf_test.Client_disconnect(station_names_fiveg)
|
||||
except:
|
||||
pass
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.test_station_ip_wpa_wpa2_ssid_5g # wifi-2167
|
||||
@allure.testcase(name="test_station_ip_wpa_wpa2_personal_ssid_5g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2167")
|
||||
def test_station_ip_wpa_wpa2_personal_ssid_5g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test,
|
||||
lf_tools, get_vlan_list, update_report, station_names_fiveg,
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, wpa, wpa2, fiveg
|
||||
pytest -m test_station_ip_wpa_wpa2_ssid_5g
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa_wpa2_personal_mixed"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
extra_secu = ["wpa2"]
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 150
|
||||
lanforge_data = get_configuration["traffic_generator"]["details"]
|
||||
upstream_port = lanforge_data["upstream"]
|
||||
port_resources = upstream_port.split(".")
|
||||
vlan_list = get_vlan_list
|
||||
print(vlan_list)
|
||||
lf_test.Client_disconnect(station_names_fiveg)
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan, cleanup=False)
|
||||
if result:
|
||||
station_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
station_names_fiveg[0])["interface"]["ip"]
|
||||
vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
|
||||
station_ip = station_ip.split(".")
|
||||
vlan_ip = vlan_ip.split(".")
|
||||
|
||||
print(station_ip[:2], vlan_ip[:2])
|
||||
for i, j in zip(station_ip[:2], vlan_ip[:2]):
|
||||
if i != j:
|
||||
assert False
|
||||
|
||||
vlan_list = [int(i) for i in vlan_list]
|
||||
if int(vlan) in vlan_list:
|
||||
print("station got IP as per VLAN. Test passed")
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
else:
|
||||
assert False
|
||||
try:
|
||||
lf_test.Client_disconnect(station_names_fiveg)
|
||||
except:
|
||||
pass
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.valid_client_ip_wpa2_personal # wifi-2172
|
||||
@allure.testcase(name="test_station_ip_wpa2_personal_ssid_5g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2172")
|
||||
def test_station_ip_wpa2_personal_ssid_5g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools,
|
||||
get_vlan_list, update_report, station_names_fiveg,
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, wpa2, fiveg
|
||||
pytest -m valid_client_ip_wpa2_personal
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 200
|
||||
lanforge_data = get_configuration["traffic_generator"]["details"]
|
||||
upstream_port = lanforge_data["upstream"]
|
||||
port_resources = upstream_port.split(".")
|
||||
vlan_list = get_vlan_list
|
||||
print(vlan_list)
|
||||
lf_test.Client_disconnect(station_names_fiveg)
|
||||
passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan, cleanup=False)
|
||||
if result:
|
||||
station_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
station_names_fiveg[0])["interface"]["ip"]
|
||||
vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + "/" +
|
||||
port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
|
||||
station_ip = station_ip.split(".")
|
||||
vlan_ip = vlan_ip.split(".")
|
||||
|
||||
print(station_ip[:2], vlan_ip[:2])
|
||||
for i, j in zip(station_ip[:2], vlan_ip[:2]):
|
||||
if i != j:
|
||||
assert False
|
||||
|
||||
vlan_list = [int(i) for i in vlan_list]
|
||||
if int(vlan) in vlan_list:
|
||||
print("station got IP as per VLAN. Test passed")
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
else:
|
||||
assert False
|
||||
try:
|
||||
lf_test.Client_disconnect(station_names_fiveg)
|
||||
except:
|
||||
pass
|
||||
@@ -1,7 +1,8 @@
|
||||
"""
|
||||
Create VLAN ,connect stations and flow traffic through it : vlan Mode
|
||||
pytest -m TestVlanConfigRadioTwog
|
||||
"""
|
||||
|
||||
|
||||
"""
|
||||
import time
|
||||
import allure
|
||||
import pytest
|
||||
@@ -9,7 +10,7 @@ import pytest
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"],"vlan":100},
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"], "vlan": 100},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
|
||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something", "vlan": 125},
|
||||
@@ -17,12 +18,13 @@ setup_params_general = {
|
||||
"security_key": "something"}],
|
||||
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something","vlan":200},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something", "vlan": 200},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
|
||||
"wpa_wpa2_personal_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something","vlan":150},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something",
|
||||
"vlan": 150},
|
||||
{"ssid_name": "ssid_wpa_wpa2_p_m_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}],
|
||||
},
|
||||
@@ -43,16 +45,21 @@ setup_params_general = {
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.TestVlanConfigRadio
|
||||
@pytest.mark.TestVlanConfigRadioTwog
|
||||
class TestVlanConfigTwogRadio(object):
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.valid_client_ip_wpa
|
||||
@pytest.mark.valid_client_ip_twog_wpa
|
||||
@allure.testcase(name="test_station_ip_wpa_ssid_2g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2168")
|
||||
def test_station_ip_wpa_ssid_2g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools, get_vlan_list, update_report, station_names_twog,
|
||||
def test_station_ip_wpa_ssid_2g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools,
|
||||
get_vlan_list, update_report, station_names_twog,
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, wpa, twog
|
||||
pytest -m valid_client_ip_twog_wpa
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
@@ -98,11 +105,16 @@ class TestVlanConfigTwogRadio(object):
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.valid_client_ip # wifi-2156
|
||||
@pytest.mark.valid_client_ip_twog_wpa2 # wifi-2156
|
||||
@allure.testcase(name="test_station_ip_wpa2_ssid_2g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2156")
|
||||
def test_station_ip_wpa2_ssid_2g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools, update_report, station_names_twog,
|
||||
def test_station_ip_wpa2_ssid_2g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools,
|
||||
update_report, station_names_twog,
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, wpa2, twog
|
||||
pytest -m valid_client_ip_twog_wpa2
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
@@ -130,7 +142,6 @@ class TestVlanConfigTwogRadio(object):
|
||||
for i, j in zip(station_ip[:2], vlan_ip[:2]):
|
||||
if i != j:
|
||||
assert False
|
||||
|
||||
print("station got IP as per VLAN. Test passed")
|
||||
assert True
|
||||
else:
|
||||
@@ -142,10 +153,16 @@ class TestVlanConfigTwogRadio(object):
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.disable_vlan # wifi-2158
|
||||
@allure.testcase(name="test_disable_vlan_wpa2_ssid_2g", url="https://telecominfraproject.atlassian.net/browse/WIFI-2158")
|
||||
def test_disable_vlan_wpa2_ssid_2g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools, update_report, station_names_twog,
|
||||
@pytest.mark.disable_vlan_twog # wifi-2158
|
||||
@allure.testcase(name="test_disable_vlan_wpa2_ssid_2g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2158")
|
||||
def test_disable_vlan_wpa2_ssid_2g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools,
|
||||
update_report, station_names_twog,
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, wpa2, twog
|
||||
pytest -m disable_vlan_twog
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
@@ -187,11 +204,16 @@ class TestVlanConfigTwogRadio(object):
|
||||
|
||||
@pytest.mark.open
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.valid_client_ip_open
|
||||
@pytest.mark.valid_client_ip_twog_open
|
||||
@allure.testcase(name="test_station_ip_open_ssid_2g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2160")
|
||||
def test_station_ip_open_ssid_2g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools, get_vlan_list, update_report, station_names_twog,
|
||||
test_cases, get_configuration):
|
||||
def test_station_ip_open_ssid_2g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools,
|
||||
get_vlan_list, update_report, station_names_twog,
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, open, twog
|
||||
pytest -m valid_client_ip_twog_open
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["open"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = "[BLANK]"
|
||||
@@ -235,15 +257,18 @@ class TestVlanConfigTwogRadio(object):
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.wpa_wpa2_personal_mixed
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.test_station_ip_wpa_wpa2_ssid_2g
|
||||
@pytest.mark.test_station_ip_twog_wpa_wpa2
|
||||
@allure.testcase(name="test_station_ip_wpa_wpa2_personal_ssid_2g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2166")
|
||||
def test_station_ip_wpa_wpa2_personal_ssid_2g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test,
|
||||
lf_tools, get_vlan_list, update_report, station_names_twog,
|
||||
test_cases, get_configuration):
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, wpa, wpa2, twog
|
||||
pytest -m test_station_ip_twog_wpa_wpa2
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa_wpa2_personal_mixed"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
@@ -288,14 +313,18 @@ class TestVlanConfigTwogRadio(object):
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.valid_client_ip_wpa2_personal # wifi-2172
|
||||
@pytest.mark.valid_client_ip_twog_wpa2 # wifi-2172
|
||||
@allure.testcase(name="test_station_ip_wpa2_personal_ssid_2g",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2172")
|
||||
def test_station_ip_wpa2_personal_ssid_2g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools, get_vlan_list, update_report, station_names_twog,
|
||||
test_cases, get_configuration):
|
||||
def test_station_ip_wpa2_personal_ssid_2g(self, get_lanforge_data, setup_profiles, create_vlan, lf_test, lf_tools,
|
||||
get_vlan_list, update_report, station_names_twog,
|
||||
test_cases, get_configuration):
|
||||
"""
|
||||
Client connectivity using vlan, wpa2, twog
|
||||
pytest -m valid_client_ip_twog_wpa2
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
@@ -337,4 +366,4 @@ class TestVlanConfigTwogRadio(object):
|
||||
try:
|
||||
lf_test.Client_disconnect(station_names_twog)
|
||||
except:
|
||||
pass
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user