diff options
author | Ed Santiago <santiago@redhat.com> | 2020-08-26 11:39:51 -0600 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2020-08-27 12:58:13 -0600 |
commit | 4060b771577356c6966d9af6b92dc5c85c20b84a (patch) | |
tree | bbb8cfc7cfed534d11161a6f1455cf625faa68a4 /test/system/070-build.bats | |
parent | 72c5b35ea5db44ca1c81a688d90f5c3aa8f8262e (diff) | |
download | podman-4060b771577356c6966d9af6b92dc5c85c20b84a.tar.gz podman-4060b771577356c6966d9af6b92dc5c85c20b84a.tar.bz2 podman-4060b771577356c6966d9af6b92dc5c85c20b84a.zip |
BATS: fix corner case in --userns=keep-id test
The test that does 'adduser' in a keep-id container had a
really dumb bug: if the user running the test has UID 1000,
then podman itself (via keep-id) will add the "1000" passwd
entry, and the in-container "adduser" will allocate 1001,
making our test fail. This triggered in f31/f32 podman gating
tests, but (?!?) never in rawhide gating tests.
Solution: explicitly feed a UID to adduser. Make sure that
it's not the same as the UID of the current user.
Also (unrelated): fix a ridiculous "run mkdir || die". At
the time I wrote that I probably had no idea how BATS works.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/070-build.bats')
-rw-r--r-- | test/system/070-build.bats | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats index 0e6e97d40..997699ecb 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -12,7 +12,7 @@ load helpers rand_content=$(random_string 50) tmpdir=$PODMAN_TMPDIR/build-test - run mkdir -p $tmpdir || die "Could not mkdir $tmpdir" + mkdir -p $tmpdir dockerfile=$tmpdir/Dockerfile cat >$dockerfile <<EOF FROM $IMAGE |