Skip to content

Commit 1119361

Browse files
pb8ozulinx86
authored andcommitted
test: add fixture with legacy artifacts
This is a temporary measure until we can migrate the tests that don't pass with the new artifacts. Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
1 parent 2daedf9 commit 1119361

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tests/conftest.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,16 @@ def uvm_with_initrd(microvm_factory, guest_kernel_linux_4_14, record_property):
450450
yield uvm
451451

452452

453+
@pytest.fixture
454+
def uvm_legacy(microvm_factory, record_property, artifact_dir):
455+
"""vm with legacy artifacts (old kernel, Ubuntu 18.04 rootfs)"""
456+
kernel = artifact_dir / "legacy/vmlinux.bin"
457+
fs = artifact_dir / "legacy/bionic-msrtools.ext4"
458+
record_property("kernel", kernel.name)
459+
record_property("rootfs", fs.name)
460+
yield microvm_factory.build(kernel, fs)
461+
462+
453463
# backwards compatibility
454464
test_microvm_with_api = uvm_plain
455465
test_microvm_with_initrd = uvm_with_initrd

tests/integration_tests/functional/test_cpu_template_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,15 +235,15 @@ def get_guest_msrs(microvm, msr_index_list):
235235
),
236236
)
237237
def test_cpu_config_dump_vs_actual(
238-
uvm_plain,
238+
uvm_legacy,
239239
cpu_template_helper,
240240
tmp_path,
241241
):
242242
"""
243243
Verify that the dumped CPU config matches the actual CPU config inside
244244
guest.
245245
"""
246-
microvm = uvm_plain
246+
microvm = uvm_legacy
247247
microvm.spawn()
248248
microvm.basic_config()
249249
microvm.add_net_iface()

0 commit comments

Comments
 (0)