tests: add basic_regular_guest macro and with_kernel

Introduce a basic_regular_guest! macro in integration.rs
to reduce boilerplate when creating regular (non-CVM)
guest instances. Also add a with_kernel() builder method
to Guest in test_infra, allowing fluent configuration of
the kernel path.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-03-21 16:36:41 -07:00
committed by Rob Bradford
parent 7802470906
commit 0fc0f2bd0e
2 changed files with 14 additions and 2 deletions

View File

@@ -1018,6 +1018,11 @@ impl Guest {
self
}
pub fn with_kernel(mut self, kernel: String) -> Self {
self.kernel_path = Some(kernel);
self
}
pub fn default_net_string(&self) -> String {
format!(
"tap=,mac={},ip={},mask=255.255.255.128",