Skip to content

Commit

Permalink
WIFI-9958 : Added a marker for ow_sdk_load_tests for sdk tests (#649)
Browse files Browse the repository at this point in the history
Signed-off-by: shivam <shivam.thakur@candelatech.com>
  • Loading branch information
embeddedshivam authored and anil-tegala committed Jun 29, 2022
1 parent 2342f73 commit f28ebf1
Show file tree
Hide file tree
Showing 10 changed files with 548 additions and 412 deletions.
181 changes: 88 additions & 93 deletions libs/controller/controller_2x/controller.py

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ def pytest_addoption(parser):
default=False,
help="skip updating firmware on the AP (useful for local testing)"
)
parser.addoption(
"--skip-env",
action="store_true",
default=False,
help="skip adding to env data"
)

parser.addoption(
"--skip-lanforge",
Expand Down Expand Up @@ -739,9 +745,9 @@ def create_lanforge_chamberview_dut(lf_tools, skip_lf, run_lf):
def lf_tools(get_configuration, testbed, skip_lf, run_lf, get_ap_version, cc_1):
""" Create a DUT on LANforge"""
if not skip_lf:
obj=ChamberView(lanforge_data=get_configuration["traffic_generator"]["details"],
testbed=testbed, run_lf=run_lf, access_point_data=get_configuration["access_point"], cc_1=cc_1,
ap_version=get_ap_version)
obj = ChamberView(lanforge_data=get_configuration["traffic_generator"]["details"],
testbed=testbed, run_lf=run_lf, access_point_data=get_configuration["access_point"],
cc_1=cc_1, ap_version=get_ap_version)
else:
obj=False
yield obj
Expand Down Expand Up @@ -806,8 +812,11 @@ def maker(key: str, value: Any):


@fixture(scope='session')
def add_env_properties(get_configuration, get_sdk_version, get_apnos, fixtures_ver, cc_1,
def add_env_properties(request, get_configuration, get_sdk_version, get_apnos, fixtures_ver, cc_1,
add_allure_environment_property: Callable) -> None:
if request.config.getoption("--skip-env"):
add_allure_environment_property('Cloud-Controller-SDK-URL', get_configuration["controller"]["url"])
return
if cc_1:
for i in range(len(get_configuration["access_point"])):
add_allure_environment_property(str('Access-Point-Model' + str(i + 1)),
Expand Down Expand Up @@ -1003,10 +1012,8 @@ def get_ap_channel(get_apnos, get_configuration):

@pytest.fixture(scope="function")
def disable_band5ghz(get_configuration):
obj=CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point'])
shut=obj.ap_5ghz_shutdown()
print(shut)

obj = CController(controller_data=get_configuration['controller'], ap_data=get_configuration['access_point'])
shut = obj.ap_5ghz_shutdown()

@pytest.fixture(scope="function")
def disable_band2ghz(get_configuration):
Expand Down
Empty file.
29 changes: 0 additions & 29 deletions tests/controller_tests/ucentral_gateway/test_devices.py

This file was deleted.

10 changes: 4 additions & 6 deletions tests/controller_tests/ucentral_gateway/test_fms_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
"""

import string
import random

import pytest
import json
import allure
import pytest


@pytest.mark.uc_sanity
@allure.feature("SDK REST API")
@pytest.mark.ow_sdk_load_tests
@allure.parent_suite("OpenWifi SDK Tests")
@allure.parent_suite("OpenWifi FMS Service Tests")
class TestUcentralFMSService(object):

@pytest.mark.system_info_fms
Expand Down
Loading

0 comments on commit f28ebf1

Please sign in to comment.