diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-12-22 12:13:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-22 12:13:57 +0100 |
commit | 3280204f727bb733b1c615cff68e8377a61eb185 (patch) | |
tree | ee467b681487d07729e651662d37fbda7b72e91b /test/system/030-run.bats | |
parent | 85f21fb2bd39d76300ab61a1fb1207405e05f9d2 (diff) | |
parent | 04dbbd96b6f69f65ac809938f44888728119db87 (diff) | |
download | podman-3280204f727bb733b1c615cff68e8377a61eb185.tar.gz podman-3280204f727bb733b1c615cff68e8377a61eb185.tar.bz2 podman-3280204f727bb733b1c615cff68e8377a61eb185.zip |
Merge pull request #12668 from vrothberg/fix-12667
support hosts without /etc/hosts
Diffstat (limited to 'test/system/030-run.bats')
-rw-r--r-- | test/system/030-run.bats | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 6f1fa600a..55514305b 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -756,4 +756,14 @@ EOF is "$output" ".*TERM=abc" "missing TERM environment variable despite TERM being set on commandline" } +@test "podman run - no /etc/hosts" { + skip_if_rootless "cannot move /etc/hosts file as a rootless user" + tmpfile=$PODMAN_TMPDIR/hosts + mv /etc/hosts $tmpfile + run_podman '?' run --rm --add-host "foo.com:1.2.3.4" $IMAGE cat "/etc/hosts" + mv $tmpfile /etc/hosts + is "$status" 0 "podman run without /etc/hosts file should work" + is "$output" "1.2.3.4 foo.com.*" "users can add hosts even without /etc/hosts" +} + # vim: filetype=sh |