Skip to content

Commit 7782d17

Browse files
committed
Fix test_canonicalize_rootfs
Signed-off-by: Stepan Koltsov <[email protected]>
1 parent bea734e commit 7782d17

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/runtime/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ mod tests {
277277
fn test_canonicalize_rootfs() {
278278
let rootfs_name = "rootfs";
279279
let bundle = tempfile::tempdir().expect("failed to create tmp test bundle dir");
280-
let rootfs_absolute_path = bundle.path().join(rootfs_name);
280+
let bundle = fs::canonicalize(bundle.path()).expect("failed to canonicalize bundle");
281+
let rootfs_absolute_path = bundle.join(rootfs_name);
281282
assert!(
282283
rootfs_absolute_path.is_absolute(),
283284
"rootfs path is not absolute path"
@@ -295,7 +296,7 @@ mod tests {
295296
.build()
296297
.unwrap();
297298

298-
spec.canonicalize_rootfs(bundle.path())
299+
spec.canonicalize_rootfs(&bundle)
299300
.expect("failed to canonicalize rootfs");
300301

301302
assert_eq!(
@@ -310,7 +311,7 @@ mod tests {
310311
.build()
311312
.unwrap();
312313

313-
spec.canonicalize_rootfs(bundle.path())
314+
spec.canonicalize_rootfs(&bundle)
314315
.expect("failed to canonicalize rootfs");
315316

316317
assert_eq!(

0 commit comments

Comments
 (0)