ut: skip TestBindUnmountContainerRootfsENOENTNotError for non-root

mount syscall requires root.

Fixes: #1898
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Peng Tao 2019-07-19 08:44:51 -07:00
parent c4583f4486
commit 3063391334

View File

@ -344,6 +344,9 @@ func TestIsEphemeralStorage(t *testing.T) {
// or directory attempting to be unmounted doesn't exist, then it
// is not considered an error
func TestBindUnmountContainerRootfsENOENTNotError(t *testing.T) {
if os.Getuid() != 0 {
t.Skip("Test disabled as requires root user")
}
testMnt := "/tmp/test_mount"
sID := "sandIDTest"
cID := "contIDTest"