diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-04 11:56:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-04 11:56:24 -0500 |
commit | f01630acf35a11aecdbfb9b77b249dcec85e67b5 (patch) | |
tree | 05e8ea3a882fa97027b2dffc9a7005438919faca /test | |
parent | a2d536e59762f657ea573e809d1e6f79a89ba0a9 (diff) | |
parent | d9154e97ebad33ead3d7f0d6aa8dea2bc4374ac2 (diff) | |
download | podman-f01630acf35a11aecdbfb9b77b249dcec85e67b5.tar.gz podman-f01630acf35a11aecdbfb9b77b249dcec85e67b5.tar.bz2 podman-f01630acf35a11aecdbfb9b77b249dcec85e67b5.zip |
Merge pull request #8476 from rhatdan/containerenv
Add containerenv information to /run/.containerenv
Diffstat (limited to 'test')
-rw-r--r-- | test/system/030-run.bats | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 37695f205..6db6b76f1 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -536,6 +536,30 @@ json-file | f run_podman untag $IMAGE $newtag $newtag2 } +@test "Verify /run/.containerenv exist" { + run_podman run --rm $IMAGE ls -1 /run/.containerenv + is "$output" "/run/.containerenv" + + run_podman run --privileged --rm $IMAGE sh -c '. /run/.containerenv; echo $engine' + is "$output" ".*podman.*" "failed to identify engine" + + run_podman run --privileged --name "testcontainerenv" --rm $IMAGE sh -c '. /run/.containerenv; echo $name' + is "$output" ".*testcontainerenv.*" + + run_podman run --privileged --rm $IMAGE sh -c '. /run/.containerenv; echo $image' + is "$output" ".*$IMAGE.*" "failed to idenitfy image" + + run_podman run --privileged --rm $IMAGE sh -c '. /run/.containerenv; echo $rootless' + # FIXME: on some CI systems, 'run --privileged' emits a spurious + # warning line about dup devices. Ignore it. + remove_same_dev_warning + if is_rootless; then + is "$output" "1" + else + is "$output" "0" + fi +} + @test "podman run with --net=host and --port prints warning" { rand=$(random_string 10) |