Skip to content

Commit 81dea55

Browse files
committed
refactor(tests): remove build_vm_micro
We have too many ways to create microvms. This drops one of them. We cannot immediately replace it with the guest_kernel/rootfs fixtures because the of the baselines. Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent 6b07275 commit 81dea55

File tree

2 files changed

+9
-37
lines changed

2 files changed

+9
-37
lines changed

tests/framework/builder.py

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -333,42 +333,10 @@ def build_from_artifacts(
333333
io_engine=io_engine,
334334
)
335335

336-
def build_vm_nano(
337-
self,
338-
fc_binary=None,
339-
jailer_binary=None,
340-
net_ifaces=None,
341-
diff_snapshots=False,
342-
daemonize=True,
343-
io_engine=None,
344-
):
336+
def build_vm_nano(self, **kwargs):
345337
"""Create a clean VM in an initial state."""
346338
return self.build_from_artifacts(
347-
"2vcpu_256mb",
348-
"vmlinux-4.14",
349-
"ubuntu-18.04",
350-
None,
351-
net_ifaces=net_ifaces,
352-
diff_snapshots=diff_snapshots,
353-
fc_binary=fc_binary,
354-
jailer_binary=jailer_binary,
355-
daemonize=daemonize,
356-
io_engine=io_engine,
357-
)
358-
359-
def build_vm_micro(
360-
self, fc_binary=None, jailer_binary=None, net_ifaces=None, diff_snapshots=False
361-
):
362-
"""Create a clean VM in an initial state."""
363-
return self.build_from_artifacts(
364-
"2vcpu_512mb",
365-
"vmlinux-4.14",
366-
"ubuntu-18.04",
367-
None,
368-
net_ifaces=net_ifaces,
369-
diff_snapshots=diff_snapshots,
370-
fc_binary=fc_binary,
371-
jailer_binary=jailer_binary,
339+
"2vcpu_256mb", "vmlinux-4.14", "ubuntu-18.04", None, **kwargs
372340
)
373341

374342
def cleanup(self):

tests/integration_tests/performance/test_snapshot_perf.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ def test_older_snapshot_resume_latency(
465465
@type: performance
466466
"""
467467
logger = logging.getLogger("old_snapshot_load")
468-
469468
builder = MicrovmBuilder(bin_cloner_path)
470469
snapshot_type = SnapshotType.FULL
471470
microvm.download()
@@ -476,8 +475,13 @@ def test_older_snapshot_resume_latency(
476475
logger.info("Source Jailer: %s", jailer.local_path())
477476

478477
# Create a fresh microvm with the binary artifacts.
479-
vm_instance = builder.build_vm_micro(
480-
firecracker_release.local_path(), jailer.local_path()
478+
vm_instance = builder.build_from_artifacts(
479+
"2vcpu_512mb",
480+
"vmlinux-4.14",
481+
"ubuntu-18.04",
482+
None,
483+
fc_binary=firecracker_release.local_path(),
484+
jailer_binary=jailer.local_path(),
481485
)
482486
basevm = vm_instance.vm
483487
basevm.start()

0 commit comments

Comments
 (0)