aboutsummaryrefslogtreecommitdiff
path: root/test/system/065-cp.bats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-22 08:40:34 -0400
committerGitHub <noreply@github.com>2022-04-22 08:40:34 -0400
commit1bafde2d226067257d430c367ec2c53208d3eeeb (patch)
tree9d5fb9b77482e7c1284eef11c18a83927dc91da8 /test/system/065-cp.bats
parent22500d797aba09eada894a69ad88f2699a560d02 (diff)
parent80c0fceb24b70a85f3f2ca8be29f4a131c0881d4 (diff)
downloadpodman-1bafde2d226067257d430c367ec2c53208d3eeeb.tar.gz
podman-1bafde2d226067257d430c367ec2c53208d3eeeb.tar.bz2
podman-1bafde2d226067257d430c367ec2c53208d3eeeb.zip
Merge pull request #13881 from rhatdan/userns
Add support for --userns=nomap
Diffstat (limited to 'test/system/065-cp.bats')
-rw-r--r--test/system/065-cp.bats8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/system/065-cp.bats b/test/system/065-cp.bats
index fe9292fd0..cfbeff3ae 100644
--- a/test/system/065-cp.bats
+++ b/test/system/065-cp.bats
@@ -119,7 +119,9 @@ load helpers
echo "content" > $srcdir/hostfile
userid=$(id -u)
- run_podman run --user=$userid --userns=keep-id -d --name cpcontainer $IMAGE sleep infinity
+ keepid="--userns=keep-id"
+ is_rootless || keepid=""
+ run_podman run --user=$userid ${keepid} -d --name cpcontainer $IMAGE sleep infinity
run_podman cp $srcdir/hostfile cpcontainer:/tmp/hostfile
run_podman exec cpcontainer stat -c "%u" /tmp/hostfile
is "$output" "$userid" "copied file is chowned to the container user"
@@ -138,7 +140,9 @@ load helpers
userid=$(id -u)
- run_podman run --user="$userid" --userns=keep-id -d --name cpcontainer $IMAGE sleep infinity
+ keepid="--userns=keep-id"
+ is_rootless || keepid=""
+ run_podman run --user=$userid ${keepid} -d --name cpcontainer $IMAGE sleep infinity
run_podman cp -a=false - cpcontainer:/tmp/ < "${tmpdir}/a.tar"
run_podman exec cpcontainer stat -c "%u:%g" /tmp/a.txt
is "$output" "1042:1043" "copied file retains uid/gid from the tar"