Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
ut: skip TestBindUnmountContainerRootfsENOENTNotError for non-root
Browse files Browse the repository at this point in the history
mount syscall requires root.

Fixes: #1898
Signed-off-by: Peng Tao <[email protected]>
  • Loading branch information
bergwolf committed Jul 19, 2019
1 parent c4583f4 commit 3063391
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions virtcontainers/mount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3063391

Please sign in to comment.