From d7002b302443b61cb6ac66282fa4ca4276a7673e Mon Sep 17 00:00:00 2001 From: bhargavi-ct Date: Mon, 14 Jul 2025 16:16:13 +0530 Subject: [PATCH] Update pass fail criteria for firmware upgrade test (#1059) Signed-off-by: bhargavi-ct Co-authored-by: bhargavi-ct --- tests/test_connectivity.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_connectivity.py b/tests/test_connectivity.py index 3eada5970..e02b2114b 100644 --- a/tests/test_connectivity.py +++ b/tests/test_connectivity.py @@ -413,7 +413,18 @@ class TestFirmwareUpgrade(object): @pytest.mark.firmware_upgrade def test_firmware_upgrade_request(self, get_target_object, get_dut_logs_per_test_case, check_connectivity): for update in get_target_object.setup_firmware(): + logging.info(f"update from setup firmware::{update}") allure.attach(name='serial: ' + update[0], body="") + if len(update) == 3: + if update[1] == update[2]: + logging.info(f"Yes, current and target firmware versions are same after firmware upgrade") + else: + logging.info(f"No, current and target firmware versions are not same") + pytest.fail(f"No, current and target firmware versions are not same") + else: + logging.info(f"upgrade_status list doesn't have firmware versions to compare: {update}") + pytest.fail(f"upgrade_status list doesn't have firmware versions to compare: {update})") + assert True @pytest.mark.test_firmware_gw