Draft
Conversation
ogayot
approved these changes
Feb 3, 2026
Member
There was a problem hiding this comment.
Thanks for making vmtest a thing! I have some suggestions but nothing blocks merging in my opinion.
I would like to have a way to specify the libvirt instance to use (i.e., qemu:///session vs qemu:///system).
It can be passed to virsh and virt-install using virsh --connect qemu:///session and virt-install --connect qemu:///session.
Maybe, define a virsh function?
def virsh(args: list[str], **kwargs):
prefix = ["virsh"]
if libvirt_instance is not None:
prefix.extend(["--connect", libvirt_instance])
return runcmd(prefix + args, **kwargs)
vmtests/tests/conftest.py
Outdated
| cloud_config["autoinstall"]["ssh"]["authorized-keys"] = [pubkey] | ||
|
|
||
| result = self.tempdir / "cloud-config.yaml" | ||
| with open(result, "w") as fp: |
Member
There was a problem hiding this comment.
I like result.write_text(...) but it's up to you!
https://docs.python.org/3/library/pathlib.html#pathlib.Path.write_text
Member
Author
|
Thanks @ogayot for the first round feedback. Updates since that round:
|
Member
Author
|
And the virsh part is still outstanding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a vmtests directory with a framework based on pytest, virt-install, and autoinstall to automate test runs in a VM.
Sample invocation:
Has some marked FIXMEs, I expect to tweak the initial contents of the actual tests also.