mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
tests: tests_api_create_boot: Use ch-remote for creating and booting vm
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
46bbe0e612
commit
67bfd4e234
@ -4042,15 +4042,17 @@ mod parallel {
|
||||
DIRECT_KERNEL_BOOT_CMDLINE,
|
||||
);
|
||||
|
||||
curl_command(
|
||||
let temp_config_path = guest.tmp_dir.as_path().join("config");
|
||||
std::fs::write(&temp_config_path, http_body).unwrap();
|
||||
|
||||
remote_command(
|
||||
&api_socket,
|
||||
"PUT",
|
||||
"http://localhost/api/v1/vm.create",
|
||||
Some(&http_body),
|
||||
"create",
|
||||
Some(temp_config_path.as_os_str().to_str().unwrap()),
|
||||
);
|
||||
|
||||
// Then boot it
|
||||
curl_command(&api_socket, "PUT", "http://localhost/api/v1/vm.boot", None);
|
||||
remote_command(&api_socket, "boot", None);
|
||||
thread::sleep(std::time::Duration::new(20, 0));
|
||||
|
||||
let r = std::panic::catch_unwind(|| {
|
||||
|
Loading…
x
Reference in New Issue
Block a user