Skip to content

Commit de1a834

Browse files
author
Roy Lin
committed
style(runtime): rustfmt wraps the parse_volume_mount test calls
1 parent d415a68 commit de1a834

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

src/runtime/src/vm/spec.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,8 @@ mod tests {
798798
let host_path = temp.path().to_str().unwrap();
799799
let volume = format!("{}:/data", host_path);
800800

801-
let mount = VmManager::parse_volume_mount(&volume, 0, std::path::Path::new("/tmp")).unwrap();
801+
let mount =
802+
VmManager::parse_volume_mount(&volume, 0, std::path::Path::new("/tmp")).unwrap();
802803
assert_eq!(mount.tag, "vol0");
803804
assert_eq!(mount.host_path, temp.path().canonicalize().unwrap());
804805
assert!(!mount.read_only);
@@ -810,7 +811,8 @@ mod tests {
810811
let host_path = temp.path().to_str().unwrap();
811812
let volume = format!("{}:/data:ro", host_path);
812813

813-
let mount = VmManager::parse_volume_mount(&volume, 1, std::path::Path::new("/tmp")).unwrap();
814+
let mount =
815+
VmManager::parse_volume_mount(&volume, 1, std::path::Path::new("/tmp")).unwrap();
814816
assert_eq!(mount.tag, "vol1");
815817
assert!(mount.read_only);
816818
}
@@ -821,7 +823,8 @@ mod tests {
821823
let host_path = temp.path().to_str().unwrap();
822824
let volume = format!("{}:/data:rw", host_path);
823825

824-
let mount = VmManager::parse_volume_mount(&volume, 2, std::path::Path::new("/tmp")).unwrap();
826+
let mount =
827+
VmManager::parse_volume_mount(&volume, 2, std::path::Path::new("/tmp")).unwrap();
825828
assert_eq!(mount.tag, "vol2");
826829
assert!(!mount.read_only);
827830
}
@@ -847,7 +850,10 @@ mod tests {
847850
// The staged dir holds the file under the GUEST basename — what the guest
848851
// binds onto the guest path.
849852
let staged = mount.host_path.join("myconf");
850-
assert!(staged.exists(), "staged file under guest basename must exist");
853+
assert!(
854+
staged.exists(),
855+
"staged file under guest basename must exist"
856+
);
851857
assert_eq!(std::fs::read(&staged).unwrap(), b"DATA");
852858
}
853859

@@ -882,7 +888,8 @@ mod tests {
882888
let volume = format!("{}:/data", host_path.display());
883889

884890
assert!(!host_path.exists());
885-
let mount = VmManager::parse_volume_mount(&volume, 0, std::path::Path::new("/tmp")).unwrap();
891+
let mount =
892+
VmManager::parse_volume_mount(&volume, 0, std::path::Path::new("/tmp")).unwrap();
886893
assert!(host_path.exists());
887894
assert_eq!(mount.host_path, host_path.canonicalize().unwrap());
888895
}

0 commit comments

Comments
 (0)