tests: use basic_regular_guest macro in test_power_button

Replace manual UbuntuDiskConfig and GuestFactory guest
creation with the basic_regular_guest! macro in
test_power_button for consistency and reduced boilerplate.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-03-21 17:34:46 -07:00
committed by Rob Bradford
parent 43fb142afb
commit 43731149c8
+1 -2
View File
@@ -243,8 +243,7 @@ mod common_parallel {
#[test] #[test]
fn test_power_button() { fn test_power_button() {
let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest = basic_regular_guest!(JAMMY_IMAGE_NAME);
let guest = GuestFactory::new_regular_guest_factory().create_guest(Box::new(disk_config));
_test_power_button(&guest); _test_power_button(&guest);
} }