Skip to content

Commit 095e101

Browse files
committed
install: add "version" test parameter, and 8.3b2 as a version
Disable the 8.3b2 reinstall, as "upgrade from platform 3.4", which includes xcpng-8.3b2, has been disabled because of broken upgrade from xs8.
1 parent 0fc1e94 commit 095e101

File tree

1 file changed

+40
-13
lines changed

1 file changed

+40
-13
lines changed

tests/install/test.py

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616

1717
@pytest.mark.dependency()
1818
class TestNested:
19+
@pytest.mark.parametrize("version", [
20+
pytest.param("821.1", marks=[
21+
pytest.mark.installer_iso("xcpng-8.2.1-2023"),
22+
]),
23+
pytest.param("83b2", marks=[
24+
pytest.mark.installer_iso("xcpng-8.3-beta2"),
25+
]),
26+
])
1927
@pytest.mark.vm_definitions(
2028
dict(name="vm 1",
2129
template="Other install media",
@@ -38,8 +46,7 @@ class TestNested:
3846
"source": {"type": "local"},
3947
"primary-disk": {"text": "nvme0n1"},
4048
})
41-
@pytest.mark.installer_iso("xcpng-8.2.1-2023")
42-
def test_install_821_uefi(self, request, iso_remaster, create_vms):
49+
def test_install_uefi(self, request, iso_remaster, create_vms, version):
4350
assert len(create_vms) == 1
4451
host_vm = create_vms[0]
4552
# FIXME should be part of vm def
@@ -122,19 +129,30 @@ def test_install_821_uefi(self, request, iso_remaster, create_vms):
122129
host_vm.export(xva_name, "zstd", use_cache=CACHE_IMPORTED_VM)
123130

124131

125-
@pytest.mark.parametrize("base", [
126-
pytest.param("install", marks=[
127-
pytest.mark.dependency(depends=["TestNested::test_install_821_uefi"]),
132+
@pytest.mark.parametrize("mode", [
133+
pytest.param("821.1", marks=[
134+
pytest.mark.dependency(depends=["TestNested::test_install_uefi[821.1]"]),
128135
pytest.mark.vm_definitions(
129-
dict(name="vm 1", image="install/test::Nested::install_821_uefi")),
136+
dict(name="vm 1", image="install/test::Nested::install_uefi[821.1]")),
130137
]),
131-
pytest.param("upgrade", marks=[
132-
pytest.mark.dependency(depends=["TestNested::test_upgrade_821_uefi"]),
138+
pytest.param("821.1_821.1", marks=[
139+
pytest.mark.dependency(depends=["TestNested::test_upgrade_uefi[821.1]"]),
133140
pytest.mark.vm_definitions(
134-
dict(name="vm 1", image="install/test::Nested::upgrade_821_uefi")),
141+
dict(name="vm 1", image="install/test::Nested::upgrade_uefi[821.1]")),
135142
]),
143+
pytest.param("83b2", marks=[
144+
pytest.mark.dependency(depends=["TestNested::test_install_uefi[83b2]"]),
145+
pytest.mark.vm_definitions(
146+
dict(name="vm 1", image="install/test::Nested::install_uefi[83b2]")),
147+
]),
148+
# 8.3b2 disabled the upgrade from 8.3
149+
#pytest.param("83b2_83b2", marks=[
150+
# pytest.mark.dependency(depends=["TestNested::test_upgrade_uefi[83b2]"]),
151+
# pytest.mark.vm_definitions(
152+
# dict(name="vm 1", image="install/test::Nested::upgrade_uefi[83b2]")),
153+
#]),
136154
])
137-
def test_firstboot_821_uefi(self, request, create_vms, base):
155+
def test_firstboot_uefi(self, request, create_vms, mode):
138156
host_vm = create_vms[0]
139157
vif = host_vm.vifs()[0]
140158
mac_address = vif.param_get('MAC')
@@ -233,7 +251,17 @@ def test_firstboot_821_uefi(self, request, create_vms, base):
233251
host_vm.host.ssh(["rm -f", xva_name])
234252
host_vm.export(xva_name, "zstd", use_cache=CACHE_IMPORTED_VM)
235253

236-
@pytest.mark.dependency(depends=["TestNested::test_firstboot_821_uefi[install]"])
254+
@pytest.mark.parametrize("version", [
255+
pytest.param("821.1", marks=[
256+
pytest.mark.dependency(depends=["TestNested::test_firstboot_uefi[821.1]"]),
257+
pytest.mark.installer_iso("xcpng-8.2.1-2023"),
258+
]),
259+
# 8.3b2 disabled the upgrade from 8.3
260+
#pytest.param("83b2", marks=[
261+
# pytest.mark.dependency(depends=["TestNested::test_firstboot_uefi[83b2]"]),
262+
# pytest.mark.installer_iso("xcpng-8.3-beta2"),
263+
#]),
264+
])
237265
@pytest.mark.vm_definitions(
238266
dict(name="vm 1",
239267
image="install/test::Nested::firstboot_821_uefi[install]"
@@ -244,8 +272,7 @@ def test_firstboot_821_uefi(self, request, create_vms, base):
244272
"source": {"type": "local"},
245273
"existing-installation": {"text": "nvme0n1"},
246274
})
247-
@pytest.mark.installer_iso("xcpng-8.2.1-2023")
248-
def test_upgrade_821_uefi(self, request, iso_remaster, create_vms):
275+
def test_upgrade_uefi(self, request, iso_remaster, create_vms, version):
249276
host_vm = create_vms[0]
250277
vif = host_vm.vifs()[0]
251278
mac_address = vif.param_get('MAC')

0 commit comments

Comments
 (0)