mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-03 12:27:53 +00:00
added teardown in 2.x setup profiles, attached logread output in teardown
Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
@@ -81,6 +81,7 @@ def setup_profiles(request, setup_controller, testbed, get_equipment_id, fixture
|
||||
get_markers, create_lanforge_chamberview_dut, lf_tools,
|
||||
get_security_flags, get_configuration, radius_info, get_apnos,
|
||||
radius_accounting_info)
|
||||
|
||||
yield return_var
|
||||
|
||||
|
||||
|
||||
@@ -65,8 +65,7 @@ class Fixtures_2x:
|
||||
def setup_profiles(self, request, param, setup_controller, testbed, get_equipment_id,
|
||||
instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools,
|
||||
get_security_flags, get_configuration, radius_info, get_apnos, radius_accounting_info):
|
||||
print("inside conftest_2x")
|
||||
if not request.config.getoption("1.x"):
|
||||
|
||||
instantiate_profile_obj = instantiate_profile(sdk_client=setup_controller)
|
||||
print("garbage")
|
||||
print(1, instantiate_profile_obj.sdk_client)
|
||||
@@ -238,8 +237,8 @@ class Fixtures_2x:
|
||||
while old_config == latest:
|
||||
time.sleep(5)
|
||||
x += 1
|
||||
print("old config: " , old_config)
|
||||
print("latest: " , latest)
|
||||
print("old config: ", old_config)
|
||||
print("latest: ", latest)
|
||||
connected, latest, active = ap_ssh.get_ucentral_status()
|
||||
if x == 19:
|
||||
break
|
||||
@@ -397,6 +396,11 @@ class Fixtures_2x:
|
||||
lf_tools.dut_idx_mapping = idx_mapping
|
||||
print(ssid_data)
|
||||
lf_tools.update_ssid(ssid_data=ssid_data)
|
||||
|
||||
def teardown_session():
|
||||
ap_logs = ap_ssh.logread()
|
||||
allure.attach(body=ap_logs, name="AP Logs after test completion")
|
||||
print("\nTeardown")
|
||||
|
||||
request.addfinalizer(teardown_session)
|
||||
return test_cases
|
||||
else:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user