mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 21:15:45 +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,
|
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,
|
&api_socket,
|
||||||
"PUT",
|
"create",
|
||||||
"http://localhost/api/v1/vm.create",
|
Some(temp_config_path.as_os_str().to_str().unwrap()),
|
||||||
Some(&http_body),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Then boot it
|
// 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));
|
thread::sleep(std::time::Duration::new(20, 0));
|
||||||
|
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
|
Loading…
Reference in New Issue
Block a user