Wifi 12301 (#806)

* Attached Ap logs if AP is in disconnected state on pre apply check

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Attached disconnected ap logs

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Replaced pytest exit with pytest fail

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Attached ap logs if up0v0 interface is failed to have connectivity

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

---------

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
This commit is contained in:
jitendracandela
2023-04-06 19:31:20 +05:30
committed by GitHub
parent 337999cf0a
commit a544d3857c
3 changed files with 8 additions and 5 deletions

View File

@@ -102,6 +102,8 @@ class APLIBS:
if output.__contains__("INCOMPLETE") or output.__contains__("FAILED"):
logging.error(output)
ap_logs = self.get_dut_logs(idx=idx, print_log=False, attach_allure=False)
allure.attach(body=ap_logs, name="AP logs")
pytest.fail("up0v0 interface is failed to have connectivity!!!")
def get_uci_show(self, param="ucentral", idx=0, print_log=True, attach_allure=True):

View File

@@ -638,6 +638,8 @@ class tip_2x:
ret_val = self.dut_library_object.ubus_call_ucentral_status(idx=idx, attach_allure=False, retry=10)
if not ret_val["connected"] or ret_val["connected"] is None:
self.dut_library_object.check_connectivity(idx=idx)
ap_logs = self.dut_library_object.get_dut_logs(idx=idx, print_log=False, attach_allure=False)
allure.attach(body=ap_logs, name="AP Log pre_apply_check: ")
pytest.fail("AP is in disconnected state from Ucentral gateway!!!")
else:
allure.step("Connected to Gateway after Restarting the ucentral Process!!!")

View File

@@ -202,11 +202,10 @@ class TestResources(object):
pytest.exit("Connected With Unexpected HOST" + "\n Current GW HOST: " + str(uci_data[0]) +
"\n EXPECTED GW HOST: " + str(gw_host))
else:
logging.error(
"Disconnected from HOST" + "\n Current GW HOST: " + str(uci_data[0]) + "\n EXPECTED GW HOST: " + str(
gw_host))
pytest.exit("Disconnected from HOST" + "\n Current GW HOST: " + str(uci_data[0]) +
"\n EXPECTED GW HOST: " + str(gw_host))
ap_logs = get_target_object.get_dut_library_object().get_dut_logs(idx=i, print_log=False, attach_allure=False)
allure.attach(body=ap_logs, name="Disconnected ap logs")
logging.error("AP is in disconnected state from Ucentral gateway!!!")
pytest.fail("AP is in disconnected state from Ucentral gateway!!!")
# @pytest.mark.traffic_generator_connectivity
# @allure.testcase(name="test_traffic_generator_connectivity", url="")