summaryrefslogtreecommitdiff
path: root/test/system/030-run.bats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-23 19:28:08 +0100
committerGitHub <noreply@github.com>2021-12-23 19:28:08 +0100
commit73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37 (patch)
tree98bbc1c08061cde903f5b1aef21790d66e8e742e /test/system/030-run.bats
parent5570b5b9751894d509be2b478685097cf8fde923 (diff)
parente8c06fac97f56ccc710584731d8b52ed58fbd2dd (diff)
downloadpodman-73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37.tar.gz
podman-73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37.tar.bz2
podman-73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37.zip
Merge pull request #12627 from rhatdan/passwd
Allow users to add host user accounts to /etc/passwd
Diffstat (limited to 'test/system/030-run.bats')
-rw-r--r--test/system/030-run.bats12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index c0b61b613..130cf5492 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -711,6 +711,18 @@ EOF
run_podman rmi nomtab
}
+@test "podman run --hostuser tests" {
+ skip_if_not_rootless "test whether hostuser is successfully added"
+ user=$(id -un)
+ run_podman 1 run --rm $IMAGE grep $user /etc/passwd
+ run_podman run --hostuser=$user --rm $IMAGE grep $user /etc/passwd
+ user=$(id -u)
+ run_podman run --hostuser=$user --rm $IMAGE grep $user /etc/passwd
+ run_podman run --hostuser=$user --user $user --rm $IMAGE grep $user /etc/passwd
+ user=bogus
+ run_podman 126 run --hostuser=$user --rm $IMAGE grep $user /etc/passwd
+}
+
@test "podman run --device-cgroup-rule tests" {
skip_if_rootless "cannot add devices in rootless mode"