@@ -40,6 +40,7 @@ def helper_vm_with_plugged_disk(running_vm, create_vms):
40
40
41
41
@pytest .mark .dependency ()
42
42
class TestNested :
43
+ @pytest .mark .parametrize ("local_sr" , ("nosr" , "ext" , "lvm" ))
43
44
@pytest .mark .parametrize ("iso_version" , (
44
45
"83nightly" ,
45
46
"83rc1" , "83b2" , "83b1" ,
@@ -74,16 +75,21 @@ class TestNested:
74
75
vifs = [dict (index = 0 , network_name = NETWORKS ["MGMT" ])],
75
76
))
76
77
@pytest .mark .answerfile (
77
- lambda install_disk : AnswerFile ("INSTALL" ).top_append (
78
+ lambda install_disk , local_sr : AnswerFile ("INSTALL" )
79
+ .top_setattr ({} if local_sr == "nosr" else {"sr-type" : local_sr })
80
+ .top_append (
78
81
{"TAG" : "source" , "type" : "local" },
79
- {"TAG" : "primary-disk" , "CONTENTS" : install_disk },
82
+ {"TAG" : "primary-disk" ,
83
+ "guest-storage" : "no" if local_sr == "nosr" else "yes" ,
84
+ "CONTENTS" : install_disk },
80
85
))
81
86
def test_install (self , vm_booted_with_installer , install_disk ,
82
- firmware , iso_version ):
87
+ firmware , iso_version , local_sr ):
83
88
host_vm = vm_booted_with_installer
84
89
installer .monitor_install (ip = host_vm .ip )
85
90
86
91
@pytest .mark .usefixtures ("xcpng_chained" )
92
+ @pytest .mark .parametrize ("local_sr" , ("nosr" , "ext" , "lvm" ))
87
93
@pytest .mark .parametrize ("machine" , ("host1" , "host2" ))
88
94
@pytest .mark .parametrize ("version" , (
89
95
"83nightly" ,
@@ -96,12 +102,12 @@ def test_install(self, vm_booted_with_installer, install_disk,
96
102
))
97
103
@pytest .mark .parametrize ("firmware" , ("uefi" , "bios" ))
98
104
@pytest .mark .continuation_of (
99
- lambda version , firmware : [dict (
105
+ lambda version , firmware , local_sr : [dict (
100
106
vm = "vm1" ,
101
- image_test = f"TestNested::test_install[{ firmware } -{ version } ]" )])
107
+ image_test = f"TestNested::test_install[{ firmware } -{ version } - { local_sr } ]" )])
102
108
@pytest .mark .small_vm
103
109
def test_tune_firstboot (self , create_vms , helper_vm_with_plugged_disk ,
104
- firmware , version , machine ):
110
+ firmware , version , machine , local_sr ):
105
111
helper_vm = helper_vm_with_plugged_disk
106
112
107
113
helper_vm .ssh (["mount /dev/xvdb1 /mnt" ])
@@ -271,6 +277,7 @@ def _test_firstboot(self, create_vms, mode, *, machine='DEFAULT', is_restore=Fal
271
277
raise
272
278
273
279
@pytest .mark .usefixtures ("xcpng_chained" )
280
+ @pytest .mark .parametrize ("local_sr" , ("nosr" , "ext" , "lvm" ))
274
281
@pytest .mark .parametrize ("machine" , ("host1" , "host2" ))
275
282
@pytest .mark .parametrize ("version" , (
276
283
"83nightly" ,
@@ -283,14 +290,15 @@ def _test_firstboot(self, create_vms, mode, *, machine='DEFAULT', is_restore=Fal
283
290
))
284
291
@pytest .mark .parametrize ("firmware" , ("uefi" , "bios" ))
285
292
@pytest .mark .continuation_of (
286
- lambda firmware , version , machine : [
293
+ lambda firmware , version , machine , local_sr : [
287
294
dict (vm = "vm1" ,
288
- image_test = f"TestNested::test_tune_firstboot[None-{ firmware } -{ version } -{ machine } ]" )])
295
+ image_test = f"TestNested::test_tune_firstboot[None-{ firmware } -{ version } -{ machine } - { local_sr } ]" )])
289
296
def test_boot_inst (self , create_vms ,
290
- firmware , version , machine ):
297
+ firmware , version , machine , local_sr ):
291
298
self ._test_firstboot (create_vms , version , machine = machine )
292
299
293
300
@pytest .mark .usefixtures ("xcpng_chained" )
301
+ @pytest .mark .parametrize ("local_sr" , ("nosr" , "ext" , "lvm" ))
294
302
@pytest .mark .parametrize ("machine" , ("host1" , "host2" ))
295
303
@pytest .mark .parametrize ("mode" , (
296
304
"83nightly-83nightly" ,
@@ -306,14 +314,15 @@ def test_boot_inst(self, create_vms,
306
314
))
307
315
@pytest .mark .parametrize ("firmware" , ("uefi" , "bios" ))
308
316
@pytest .mark .continuation_of (
309
- lambda firmware , mode , machine : [dict (
317
+ lambda firmware , mode , machine , local_sr : [dict (
310
318
vm = "vm1" ,
311
- image_test = (f"TestNested::test_upgrade[{ firmware } -{ mode } -{ machine } ]" ))])
319
+ image_test = (f"TestNested::test_upgrade[{ firmware } -{ mode } -{ machine } - { local_sr } ]" ))])
312
320
def test_boot_upg (self , create_vms ,
313
- firmware , mode , machine ):
321
+ firmware , mode , machine , local_sr ):
314
322
self ._test_firstboot (create_vms , mode , machine = machine )
315
323
316
324
@pytest .mark .usefixtures ("xcpng_chained" )
325
+ @pytest .mark .parametrize ("local_sr" , ("nosr" , "ext" , "lvm" ))
317
326
@pytest .mark .parametrize ("mode" , (
318
327
"83nightly-83nightly-83nightly" ,
319
328
"83rc1-83nightly-83nightly" ,
@@ -328,14 +337,15 @@ def test_boot_upg(self, create_vms,
328
337
))
329
338
@pytest .mark .parametrize ("firmware" , ("uefi" , "bios" ))
330
339
@pytest .mark .continuation_of (
331
- lambda firmware , mode : [dict (
340
+ lambda firmware , mode , local_sr : [dict (
332
341
vm = "vm1" ,
333
- image_test = (f"TestNested::test_restore[{ firmware } -{ mode } ]" ))])
342
+ image_test = (f"TestNested::test_restore[{ firmware } -{ mode } - { local_sr } ]" ))])
334
343
def test_boot_rst (self , create_vms ,
335
- firmware , mode ):
344
+ firmware , mode , local_sr ):
336
345
self ._test_firstboot (create_vms , mode , is_restore = True )
337
346
338
347
@pytest .mark .usefixtures ("xcpng_chained" )
348
+ @pytest .mark .parametrize ("local_sr" , ("nosr" , "ext" , "lvm" ))
339
349
@pytest .mark .parametrize ("machine" , ("host1" , "host2" ))
340
350
@pytest .mark .parametrize (("orig_version" , "iso_version" ), [
341
351
("83nightly" , "83nightly" ),
@@ -351,21 +361,22 @@ def test_boot_rst(self, create_vms,
351
361
])
352
362
@pytest .mark .parametrize ("firmware" , ("uefi" , "bios" ))
353
363
@pytest .mark .continuation_of (
354
- lambda firmware , orig_version , machine : [dict (
364
+ lambda firmware , orig_version , machine , local_sr : [dict (
355
365
vm = "vm1" ,
356
- image_test = f"TestNested::test_boot_inst[{ firmware } -{ orig_version } -{ machine } ]" )])
366
+ image_test = f"TestNested::test_boot_inst[{ firmware } -{ orig_version } -{ machine } - { local_sr } ]" )])
357
367
@pytest .mark .answerfile (
358
368
lambda install_disk : AnswerFile ("UPGRADE" ).top_append (
359
369
{"TAG" : "source" , "type" : "local" },
360
370
{"TAG" : "existing-installation" ,
361
371
"CONTENTS" : install_disk },
362
372
))
363
373
def test_upgrade (self , vm_booted_with_installer , install_disk ,
364
- firmware , orig_version , iso_version , machine ):
374
+ firmware , orig_version , iso_version , machine , local_sr ):
365
375
host_vm = vm_booted_with_installer
366
376
installer .monitor_upgrade (ip = host_vm .ip )
367
377
368
378
@pytest .mark .usefixtures ("xcpng_chained" )
379
+ @pytest .mark .parametrize ("local_sr" , ("nosr" , "ext" , "lvm" ))
369
380
@pytest .mark .parametrize (("orig_version" , "iso_version" ), [
370
381
("83nightly-83nightly" , "83nightly" ),
371
382
("83rc1-83nightly" , "83nightly" ),
@@ -380,15 +391,15 @@ def test_upgrade(self, vm_booted_with_installer, install_disk,
380
391
])
381
392
@pytest .mark .parametrize ("firmware" , ("uefi" , "bios" ))
382
393
@pytest .mark .continuation_of (
383
- lambda firmware , orig_version : [dict (
394
+ lambda firmware , orig_version , local_sr : [dict (
384
395
vm = "vm1" ,
385
- image_test = f"TestNested::test_boot_upg[{ firmware } -{ orig_version } -host1]" )])
396
+ image_test = f"TestNested::test_boot_upg[{ firmware } -{ orig_version } -host1- { local_sr } ]" )])
386
397
@pytest .mark .answerfile (
387
398
lambda install_disk : AnswerFile ("RESTORE" ).top_append (
388
399
{"TAG" : "backup-disk" ,
389
400
"CONTENTS" : install_disk },
390
401
))
391
402
def test_restore (self , vm_booted_with_installer , install_disk ,
392
- firmware , orig_version , iso_version ):
403
+ firmware , orig_version , iso_version , local_sr ):
393
404
host_vm = vm_booted_with_installer
394
405
installer .monitor_restore (ip = host_vm .ip )
0 commit comments