From 2f02f1d05360045dee78c272175f039180bb0a87 Mon Sep 17 00:00:00 2001 From: Roger Yao Date: Tue, 26 Sep 2023 09:17:03 +0800 Subject: [PATCH] Update upgrade test case to support the validation of both 'spec.engineImage' and 'spec.image' fields. Ref: https://github.com/longhorn/longhorn/issues/6777 Signed-off-by: Roger Yao --- manager/integration/tests/test_upgrade.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/manager/integration/tests/test_upgrade.py b/manager/integration/tests/test_upgrade.py index 4c1e7d6d16..428d41c7b2 100644 --- a/manager/integration/tests/test_upgrade.py +++ b/manager/integration/tests/test_upgrade.py @@ -567,7 +567,12 @@ def test_upgrade(longhorn_upgrade_type, if v.name != restore_vol_name: volume = client.by_id_volume(v.name) engine = get_volume_engine(volume) - assert engine.image == new_ei.image + if hasattr(engine, 'engineImage'): + print("Checking engineImage...") + assert engine.engineImage == new_ei.image + else: + print("Checking image...") + assert engine.image == new_ei.image assert engine.currentImage == new_ei.image # Check All volumes data