Skip to content

Commit c33a13d

Browse files
committed
install: produce several hosts from single install
This is just base infra, different machines have not differences yet. Signed-off-by: Yann Dirson <[email protected]>
1 parent 8b686f7 commit c33a13d

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
tests/install/test.py::TestNested::test_upgrade[uefi-83nightly-83nightly]
2-
tests/install/test.py::TestNested::test_boot_upg[uefi-83nightly-83nightly]
1+
tests/install/test.py::TestNested::test_upgrade[uefi-83nightly-83nightly-host1]
2+
tests/install/test.py::TestNested::test_boot_upg[uefi-83nightly-83nightly-host1]

tests/install/test-sequences/inst.lst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
tests/install/test.py::TestNested::test_install[uefi-83nightly]
2-
tests/install/test.py::TestNested::test_boot_inst[uefi-83nightly]
2+
tests/install/test.py::TestNested::test_boot_inst[uefi-83nightly-host1]

tests/install/test.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ def _test_firstboot(self, create_vms, mode, is_restore=False):
213213
raise
214214

215215
@pytest.mark.usefixtures("xcpng_chained")
216+
@pytest.mark.parametrize("machine", ("host1", "host2"))
216217
@pytest.mark.parametrize("version", (
217218
"83nightly",
218219
"83rc1", "83b2", "83b1",
@@ -227,10 +228,11 @@ def _test_firstboot(self, create_vms, mode, is_restore=False):
227228
lambda firmware, version: [
228229
dict(vm="vm1", image_test=f"TestNested::test_install[{firmware}-{version}]")])
229230
def test_boot_inst(self, create_vms,
230-
firmware, version):
231+
firmware, version, machine):
231232
self._test_firstboot(create_vms, version)
232233

233234
@pytest.mark.usefixtures("xcpng_chained")
235+
@pytest.mark.parametrize("machine", ("host1", "host2"))
234236
@pytest.mark.parametrize("mode", (
235237
"83nightly-83nightly",
236238
"83rc1-83nightly",
@@ -245,11 +247,11 @@ def test_boot_inst(self, create_vms,
245247
))
246248
@pytest.mark.parametrize("firmware", ("uefi", "bios"))
247249
@pytest.mark.continuation_of(
248-
lambda firmware, mode: [dict(
250+
lambda firmware, mode, machine: [dict(
249251
vm="vm1",
250-
image_test=(f"TestNested::test_upgrade[{firmware}-{mode}]"))])
252+
image_test=(f"TestNested::test_upgrade[{firmware}-{mode}-{machine}]"))])
251253
def test_boot_upg(self, create_vms,
252-
firmware, mode):
254+
firmware, mode, machine):
253255
self._test_firstboot(create_vms, mode)
254256

255257
@pytest.mark.usefixtures("xcpng_chained")
@@ -275,6 +277,7 @@ def test_boot_rst(self, create_vms,
275277
self._test_firstboot(create_vms, mode, is_restore=True)
276278

277279
@pytest.mark.usefixtures("xcpng_chained")
280+
@pytest.mark.parametrize("machine", ("host1", "host2"))
278281
@pytest.mark.parametrize(("orig_version", "iso_version"), [
279282
("83nightly", "83nightly"),
280283
("83rc1", "83nightly"),
@@ -289,17 +292,17 @@ def test_boot_rst(self, create_vms,
289292
])
290293
@pytest.mark.parametrize("firmware", ("uefi", "bios"))
291294
@pytest.mark.continuation_of(
292-
lambda firmware, orig_version: [dict(
295+
lambda firmware, orig_version, machine: [dict(
293296
vm="vm1",
294-
image_test=f"TestNested::test_boot_inst[{firmware}-{orig_version}]")])
297+
image_test=f"TestNested::test_boot_inst[{firmware}-{orig_version}-{machine}]")])
295298
@pytest.mark.answerfile(
296299
lambda install_disk: AnswerFile("UPGRADE").top_append(
297300
{"TAG": "source", "type": "local"},
298301
{"TAG": "existing-installation",
299302
"CONTENTS": install_disk},
300303
))
301304
def test_upgrade(self, vm_booted_with_installer, install_disk,
302-
firmware, orig_version, iso_version):
305+
firmware, orig_version, iso_version, machine):
303306
host_vm = vm_booted_with_installer
304307
installer.monitor_upgrade(ip=host_vm.ip)
305308

@@ -320,7 +323,7 @@ def test_upgrade(self, vm_booted_with_installer, install_disk,
320323
@pytest.mark.continuation_of(
321324
lambda firmware, orig_version: [dict(
322325
vm="vm1",
323-
image_test=f"TestNested::test_boot_upg[{firmware}-{orig_version}]")])
326+
image_test=f"TestNested::test_boot_upg[{firmware}-{orig_version}-host1]")])
324327
@pytest.mark.answerfile(
325328
lambda install_disk: AnswerFile("RESTORE").top_append(
326329
{"TAG": "backup-disk",

0 commit comments

Comments
 (0)