mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: use basic_regular_guest macro in test_api_http_create_boot
Replace manual UbuntuDiskConfig and GuestFactory guest creation with the basic_regular_guest! macro in test_api_http_create_boot, chaining with_cpu(4) for the required CPU count configuration. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
698084f3d7
commit
6f9794ded0
@@ -2764,10 +2764,7 @@ mod common_parallel {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_api_http_create_boot() {
|
fn test_api_http_create_boot() {
|
||||||
let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string());
|
let guest = basic_regular_guest!(JAMMY_IMAGE_NAME).with_cpu(4);
|
||||||
let guest = GuestFactory::new_regular_guest_factory()
|
|
||||||
.create_guest(Box::new(disk_config))
|
|
||||||
.with_cpu(4);
|
|
||||||
|
|
||||||
let target_api = TargetApi::new_http_api(&guest.tmp_dir);
|
let target_api = TargetApi::new_http_api(&guest.tmp_dir);
|
||||||
_test_api_create_boot(&target_api, &guest);
|
_test_api_create_boot(&target_api, &guest);
|
||||||
|
|||||||
Reference in New Issue
Block a user