summary refs log tree commit diff
path: root/host/start-vm/tests/vm_command-multiple-disks.rs
diff options
context:
space:
mode:
Diffstat (limited to 'host/start-vm/tests/vm_command-multiple-disks.rs')
-rw-r--r--host/start-vm/tests/vm_command-multiple-disks.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/host/start-vm/tests/vm_command-multiple-disks.rs b/host/start-vm/tests/vm_command-multiple-disks.rs
index e17d505..cd1e997 100644
--- a/host/start-vm/tests/vm_command-multiple-disks.rs
+++ b/host/start-vm/tests/vm_command-multiple-disks.rs
@@ -10,10 +10,11 @@ use start_vm::vm_command;
 use test_helper::TempDir;
 
 fn main() -> std::io::Result<()> {
-    let tmp_dir = TempDir::new()?;
+    let service_dir_parent = TempDir::new()?;
+    let service_dir = service_dir_parent.path().join("vm-testvm");
 
-    let service_dir = tmp_dir.path().join("vm-testvm");
-    let vm_config = service_dir.join("data/config");
+    let vm_dir = TempDir::new()?;
+    let vm_config = vm_dir.path().join("testvm");
 
     create_dir_all(&vm_config)?;
     File::create(vm_config.join("vmlinux"))?;
@@ -27,7 +28,7 @@ fn main() -> std::io::Result<()> {
         symlink("/dev/null", image_path)?;
     }
 
-    let command = vm_command(&service_dir, -1).unwrap();
+    let command = vm_command(&service_dir, vm_dir.path(), -1).unwrap();
     let mut args = command.get_args();
 
     assert!(args.any(|arg| arg == "--disk"));