diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-15 10:27:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 10:27:09 -0400 |
commit | 8704b78a6fbb953acb6b74d1671d5ad6456bf81f (patch) | |
tree | 7ad7b6effec13409798fa2d6f96bd9de4d4462c9 /test/system/075-exec.bats | |
parent | 60127cf5e88ef53748cb601d7c27f082d284e7f4 (diff) | |
parent | fea3eea68bf483e33bae56d77071d5cb8ded91db (diff) | |
download | podman-8704b78a6fbb953acb6b74d1671d5ad6456bf81f.tar.gz podman-8704b78a6fbb953acb6b74d1671d5ad6456bf81f.tar.bz2 podman-8704b78a6fbb953acb6b74d1671d5ad6456bf81f.zip |
Merge pull request #6958 from edsantiago/bats
system tests: new tests for run, exec
Diffstat (limited to 'test/system/075-exec.bats')
-rw-r--r-- | test/system/075-exec.bats | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/test/system/075-exec.bats b/test/system/075-exec.bats index f8c7f2766..945bcfa2d 100644 --- a/test/system/075-exec.bats +++ b/test/system/075-exec.bats @@ -6,8 +6,6 @@ load helpers @test "podman exec - basic test" { - skip_if_remote - rand_filename=$(random_string 20) rand_content=$(random_string 50) @@ -80,4 +78,24 @@ load helpers run_podman rm $cid } +# #6829 : add username to /etc/passwd inside container if --userns=keep-id +# #6593 : doesn't actually work with podman exec +@test "podman exec - with keep-id" { + skip "Please enable once #6593 is fixed" + + run_podman run -d --userns=keep-id $IMAGE sh -c \ + "echo READY;while [ ! -f /stop ]; do sleep 1; done" + cid="$output" + wait_for_ready $cid + + run_podman exec $cid id -un + is "$output" "$(id -un)" "container is running as current user" + + # Until #6593 gets fixed, this just hangs. The server process barfs with: + # unable to find user <username>: no matching entries in passwd file + run_podman exec --user=$(id -un) $cid touch /stop + run_podman wait $cid + run_podman rm $cid +} + # vim: filetype=sh |