tests: Use GuestFactory in CVM simple launch test

Replace manual Guest field assignments with
GuestFactory::new_confidential_guest_factory() in
test_focal_simple_launch for consistent CVM guest creation.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-02-28 16:19:10 -08:00
committed by Rob Bradford
parent b8a6afd332
commit f6829561e5

View File

@@ -14555,10 +14555,9 @@ mod common_cvm {
#[test]
fn test_focal_simple_launch() {
let disk_config = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(disk_config));
guest.vm_type = GuestVmType::Confidential;
guest.boot_timeout = DEFAULT_CVM_TCP_LISTENER_TIMEOUT;
guest.nested = false;
let guest =
GuestFactory::new_confidential_guest_factory().create_guest(Box::new(disk_config));
_test_simple_launch(&guest)
}