16
16
17
17
@pytest .mark .dependency ()
18
18
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
- ])
19
+ @pytest .mark .parametrize ("version" , ("821.1" , "83b2" ))
20
+ @pytest .mark .installer_iso (lambda version : {"821.1" : "xcpng-8.2.1-2023" ,
21
+ "83b2" : "xcpng-8.3-beta2" }[version ])
27
22
@pytest .mark .vm_definitions (
28
23
dict (name = "vm 1" ,
29
24
template = "Other install media" ,
@@ -46,7 +41,7 @@ class TestNested:
46
41
"source" : {"type" : "local" },
47
42
"primary-disk" : {"text" : "nvme0n1" },
48
43
})
49
- def test_install_uefi (self , request , iso_remaster , create_vms , version ):
44
+ def test_install_uefi (self , request , version , iso_remaster , create_vms ):
50
45
assert len (create_vms ) == 1
51
46
host_vm = create_vms [0 ]
52
47
# FIXME should be part of vm def
@@ -261,20 +256,17 @@ def test_firstboot_uefi(self, request, create_vms, mode):
261
256
pytest .mark .dependency (depends = ["TestNested::test_firstboot_uefi[821.1]" ]),
262
257
pytest .mark .vm_definitions (
263
258
dict (name = "vm 1" , image = "install/test::Nested::firstboot_uefi[821.1]" )),
264
- pytest .mark .installer_iso ("xcpng-8.2.1-2023" ),
265
259
]),
266
260
pytest .param ("821.1" , "83b2" , marks = [
267
261
pytest .mark .dependency (depends = ["TestNested::test_firstboot_uefi[821.1]" ]),
268
262
pytest .mark .vm_definitions (
269
263
dict (name = "vm 1" , image = "install/test::Nested::firstboot_uefi[821.1]" )),
270
- pytest .mark .installer_iso ("xcpng-8.3-beta2" ),
271
264
]),
272
265
# 8.3b2 disabled the upgrade from 8.3
273
266
#pytest.param("83b2", "83b2", marks=[
274
267
# pytest.mark.dependency(depends=["TestNested::test_firstboot_uefi[83b2]"]),
275
268
# pytest.mark.vm_definitions(
276
269
# dict(name="vm 1", image="install/test::Nested::firstboot_uefi[83b2]")),
277
- # pytest.mark.installer_iso("xcpng-8.3-beta2"),
278
270
#]),
279
271
])
280
272
@pytest .mark .answerfile (
@@ -283,6 +275,8 @@ def test_firstboot_uefi(self, request, create_vms, mode):
283
275
"source" : {"type" : "local" },
284
276
"existing-installation" : {"text" : "nvme0n1" },
285
277
})
278
+ @pytest .mark .installer_iso (lambda version : {"821.1" : "xcpng-8.2.1-2023" ,
279
+ "83b2" : "xcpng-8.3-beta2" }[version ])
286
280
def test_upgrade_uefi (self , request , iso_remaster , create_vms , orig_version , version ):
287
281
host_vm = create_vms [0 ]
288
282
vif = host_vm .vifs ()[0 ]
0 commit comments