From 25c91afbea5788de80a004efa861eb84d583dbbd Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Thu, 10 Sep 2020 10:34:48 -0500 Subject: [PATCH] agent/rustjail: add unit test for pivot_rootfs Add unit test for pivot_rootfs increasing the code coverage of mount.rs Signed-off-by: Julio Montes --- src/agent/rustjail/src/mount.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/agent/rustjail/src/mount.rs b/src/agent/rustjail/src/mount.rs index 78b0c02727..1ce746d72d 100644 --- a/src/agent/rustjail/src/mount.rs +++ b/src/agent/rustjail/src/mount.rs @@ -1017,4 +1017,10 @@ mod tests { ); assert!(ret.is_ok(), "Should pass. Got: {:?}", ret); } + + #[test] + fn test_pivot_root() { + let ret = pivot_rootfs("/tmp"); + assert!(ret.is_ok(), "Should pass. Got: {:?}", ret); + } }