@@ -38,15 +38,10 @@ class TestNested:
38
38
"source" : {"type" : "local" },
39
39
"primary-disk" : {"text" : "nvme0n1" },
40
40
})
41
- @pytest .mark .parametrize ("version" , [
42
- pytest .param ("821.1" , marks = [
43
- pytest .mark .installer_iso ("xcpng-8.2.1-2023" ),
44
- ]),
45
- pytest .param ("83b2" , marks = [
46
- pytest .mark .installer_iso ("xcpng-8.3-beta2" ),
47
- ]),
48
- ])
49
- def test_install_uefi (self , request , iso_remaster , create_vms , version ):
41
+ @pytest .mark .installer_iso (lambda version : {"821.1" : "xcpng-8.2.1-2023" ,
42
+ "83b2" : "xcpng-8.3-beta2" }[version ])
43
+ @pytest .mark .parametrize ("version" , ("821.1" , "83b2" ))
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
@@ -260,19 +255,16 @@ def test_firstboot_uefi(self, request, create_vms, mode):
260
255
pytest .mark .dependency (depends = ["TestNested::test_firstboot_uefi[821.1_install]" ]),
261
256
pytest .mark .vm_definitions (
262
257
dict (name = "vm 1" , image = "install/test::Nested::firstboot_uefi[821.1_install]" )),
263
- pytest .mark .installer_iso ("xcpng-8.2.1-2023" ),
264
258
]),
265
259
pytest .param ("821.1" , "83b2" , marks = [
266
260
pytest .mark .dependency (depends = ["TestNested::test_firstboot_uefi[821.1_install]" ]),
267
261
pytest .mark .vm_definitions (
268
262
dict (name = "vm 1" , image = "install/test::Nested::firstboot_uefi[821.1_install]" )),
269
- pytest .mark .installer_iso ("xcpng-8.3-beta2" ),
270
263
]),
271
264
pytest .param ("83b2" , "83b2" , marks = [
272
265
pytest .mark .dependency (depends = ["TestNested::test_firstboot_uefi[83b2_install]" ]),
273
266
pytest .mark .vm_definitions (
274
267
dict (name = "vm 1" , image = "install/test::Nested::firstboot_uefi[83b2_install]" )),
275
- pytest .mark .installer_iso ("xcpng-8.3-beta2" ),
276
268
]),
277
269
])
278
270
@pytest .mark .answerfile (
@@ -281,6 +273,8 @@ def test_firstboot_uefi(self, request, create_vms, mode):
281
273
"source" : {"type" : "local" },
282
274
"existing-installation" : {"text" : "nvme0n1" },
283
275
})
276
+ @pytest .mark .installer_iso (lambda version : {"821.1" : "xcpng-8.2.1-2023" ,
277
+ "83b2" : "xcpng-8.3-beta2" }[version ])
284
278
def test_upgrade_uefi (self , request , iso_remaster , create_vms , orig_version , version ):
285
279
host_vm = create_vms [0 ]
286
280
vif = host_vm .vifs ()[0 ]
0 commit comments