From c29fc2809f0d352281e456bfd45f5ecf3b035b43 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Tue, 11 Jun 2024 18:30:16 +0200 Subject: [PATCH] upgrade: add actual upgrade tests to reinstall ones --- tests/install/test.py | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/tests/install/test.py b/tests/install/test.py index 99b70bad8..60a86ea28 100644 --- a/tests/install/test.py +++ b/tests/install/test.py @@ -136,9 +136,14 @@ def test_install_uefi(self, request, iso_remaster, create_vms, version): dict(name="vm 1", image="install/test::Nested::install_uefi[821.1]")), ]), pytest.param("821.1_821.1", marks=[ - pytest.mark.dependency(depends=["TestNested::test_upgrade_uefi[821.1]"]), + pytest.mark.dependency(depends=["TestNested::test_upgrade_uefi[821.1-821.1]"]), pytest.mark.vm_definitions( - dict(name="vm 1", image="install/test::Nested::upgrade_uefi[821.1]")), + dict(name="vm 1", image="install/test::Nested::upgrade_uefi[821.1-821.1]")), + ]), + pytest.param("821.1_83b2", marks=[ + pytest.mark.dependency(depends=["TestNested::test_upgrade_uefi[821.1-83b2]"]), + pytest.mark.vm_definitions( + dict(name="vm 1", image="install/test::Nested::upgrade_uefi[821.1-83b2]")), ]), pytest.param("83b2_install", marks=[ pytest.mark.dependency(depends=["TestNested::test_install_uefi[83b2]"]), @@ -146,9 +151,9 @@ def test_install_uefi(self, request, iso_remaster, create_vms, version): dict(name="vm 1", image="install/test::Nested::install_uefi[83b2]")), ]), pytest.param("83b2_83b2", marks=[ - pytest.mark.dependency(depends=["TestNested::test_upgrade_uefi[83b2]"]), + pytest.mark.dependency(depends=["TestNested::test_upgrade_uefi[83b2-83b2]"]), pytest.mark.vm_definitions( - dict(name="vm 1", image="install/test::Nested::upgrade_uefi[83b2]")), + dict(name="vm 1", image="install/test::Nested::upgrade_uefi[83b2-83b2]")), ]), ]) def test_firstboot_uefi(self, request, create_vms, mode): @@ -250,27 +255,33 @@ def test_firstboot_uefi(self, request, create_vms, mode): host_vm.host.ssh(["rm -f", xva_name]) host_vm.export(xva_name, "zstd", use_cache=CACHE_IMPORTED_VM) - @pytest.mark.parametrize("version", [ - pytest.param("821.1", marks=[ + @pytest.mark.parametrize(("orig_version", "version"), [ + pytest.param("821.1", "821.1", marks=[ pytest.mark.dependency(depends=["TestNested::test_firstboot_uefi[821.1_install]"]), + pytest.mark.vm_definitions( + dict(name="vm 1", image="install/test::Nested::firstboot_uefi[821.1_install]")), pytest.mark.installer_iso("xcpng-8.2.1-2023"), ]), - pytest.param("83b2", marks=[ + pytest.param("821.1", "83b2", marks=[ + pytest.mark.dependency(depends=["TestNested::test_firstboot_uefi[821.1_install]"]), + pytest.mark.vm_definitions( + dict(name="vm 1", image="install/test::Nested::firstboot_uefi[821.1_install]")), + pytest.mark.installer_iso("xcpng-8.3-beta2"), + ]), + pytest.param("83b2", "83b2", marks=[ pytest.mark.dependency(depends=["TestNested::test_firstboot_uefi[83b2_install]"]), + pytest.mark.vm_definitions( + dict(name="vm 1", image="install/test::Nested::firstboot_uefi[83b2_install]")), pytest.mark.installer_iso("xcpng-8.3-beta2"), ]), ]) - @pytest.mark.vm_definitions( - dict(name="vm 1", - image="install/test::Nested::firstboot_821_uefi[install]" - )) @pytest.mark.answerfile( { "base": "UPGRADE", "source": {"type": "local"}, "existing-installation": {"text": "nvme0n1"}, }) - def test_upgrade_uefi(self, request, iso_remaster, create_vms, version): + def test_upgrade_uefi(self, request, iso_remaster, create_vms, orig_version, version): host_vm = create_vms[0] vif = host_vm.vifs()[0] mac_address = vif.param_get('MAC')