Skip to content

Commit

Permalink
upgrade: add actual upgrade tests to reinstall ones
Browse files Browse the repository at this point in the history
  • Loading branch information
ydirson committed Jun 13, 2024
1 parent 24304bb commit c29fc28
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions tests/install/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,24 @@ 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]"]),
pytest.mark.vm_definitions(
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):
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit c29fc28

Please sign in to comment.