From 67bfd4e234b8938d9f7c2c086be999fa5c8b6c3b Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 1 Jul 2022 12:05:29 +0100 Subject: [PATCH] tests: tests_api_create_boot: Use ch-remote for creating and booting vm Signed-off-by: Rob Bradford --- tests/integration.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index ccc7daea3..2e8a56887 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -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(|| {