mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2026-01-10 22:31:42 +00:00
env property fix for 1.x
adding environment for 2.x was causing fail for 1.x runs, so added condition
This commit is contained in:
@@ -661,16 +661,18 @@ def add_allure_environment_property(request: SubRequest) -> Optional[Callable]:
|
||||
|
||||
@fixture(scope='session')
|
||||
def get_uc_ap_version(get_apnos, get_configuration):
|
||||
version_list = []
|
||||
for access_point_info in get_configuration['access_point']:
|
||||
ap_ssh = get_apnos(access_point_info)
|
||||
version = ap_ssh.get_ap_version_ucentral()
|
||||
version_list.append(version)
|
||||
yield version_list
|
||||
if request.config.getoption("2.x"):
|
||||
version_list = []
|
||||
for access_point_info in get_configuration['access_point']:
|
||||
ap_ssh = get_apnos(access_point_info)
|
||||
version = ap_ssh.get_ap_version_ucentral()
|
||||
version_list.append(version)
|
||||
yield version_list
|
||||
|
||||
|
||||
@fixture(scope='session')
|
||||
def add_env_properties(get_configuration, get_uc_ap_version, add_allure_environment_property: Callable) -> None:
|
||||
add_allure_environment_property('Access-Point-Model', get_configuration["access_point"][0]["model"])
|
||||
add_allure_environment_property('Access-Point-Firmware-Version', get_uc_ap_version[0].split("\n")[1])
|
||||
add_allure_environment_property('Cloud-Controller-SDK-URL', get_configuration["controller"]["url"])
|
||||
if request.config.getoption("2.x"):
|
||||
add_allure_environment_property('Access-Point-Model', get_configuration["access_point"][0]["model"])
|
||||
add_allure_environment_property('Access-Point-Firmware-Version', get_uc_ap_version[0].split("\n")[1])
|
||||
add_allure_environment_property('Cloud-Controller-SDK-URL', get_configuration["controller"]["url"])
|
||||
|
||||
Reference in New Issue
Block a user