summaryrefslogtreecommitdiff
path: root/test/system/160-volumes.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/system/160-volumes.bats')
-rw-r--r--test/system/160-volumes.bats13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/system/160-volumes.bats b/test/system/160-volumes.bats
index 571d8767e..5b0460723 100644
--- a/test/system/160-volumes.bats
+++ b/test/system/160-volumes.bats
@@ -182,13 +182,14 @@ EOF
run_podman volume rm $myvol
- # Autocreated volumes should also work with keep-id
- # All we do here is check status; podman 1.9.1 would fail with EPERM
- myvol=myvol$(random_string)
- run_podman run --rm -v $myvol:/myvol:z --userns=keep-id $IMAGE \
+ if is_rootless; then
+ # Autocreated volumes should also work with keep-id
+ # All we do here is check status; podman 1.9.1 would fail with EPERM
+ myvol=myvol$(random_string)
+ run_podman run --rm -v $myvol:/myvol:z --userns=keep-id $IMAGE \
touch /myvol/myfile
-
- run_podman volume rm $myvol
+ run_podman volume rm $myvol
+ fi
}