diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-10-20 08:40:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-20 08:40:10 +0000 |
commit | 2c6c80106720978897d8a31be34ea4521dff5b31 (patch) | |
tree | ff2a89d64540c0452e8dd69394dc5a107ef79d80 | |
parent | fba7a05b1b24917b92faedfd097c7ab88c48bc5e (diff) | |
parent | 960a55c09d8b84d3261b4a9fbc9e02c43928fa41 (diff) | |
download | podman-2c6c80106720978897d8a31be34ea4521dff5b31.tar.gz podman-2c6c80106720978897d8a31be34ea4521dff5b31.tar.bz2 podman-2c6c80106720978897d8a31be34ea4521dff5b31.zip |
Merge pull request #12041 from edsantiago/container_env
system tests: CONTAINER_* and --help: cleanup
-rw-r--r-- | test/system/001-basic.bats | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/test/system/001-basic.bats b/test/system/001-basic.bats index 50735f576..78b8ecdfd 100644 --- a/test/system/001-basic.bats +++ b/test/system/001-basic.bats @@ -94,22 +94,21 @@ function setup() { } @test "podman-remote: defaults" { - if is_remote; then - skip "only applicable on a local run" - fi + skip_if_remote "only applicable on a local run" + + # By default, podman should include '--remote' in its help output + run_podman --help + is "$output" ".* --remote " "podman --help includes the --remote option" + # When it detects CONTAINER_HOST or _CONNECTION, --remote is not an option CONTAINER_HOST=foobar run_podman --help - # Should not have --remote flag - echo $output | grep -v -qw -- "--remote" - if [ $? -ne 0 ]; then - die "Should not have --remote flag" + if grep -- " --remote " <<<"$output"; then + die "podman --help, with CONTAINER_HOST set, is showing --remote" fi CONTAINER_CONNECTION=foobar run_podman --help - # Should not have --remote flag - echo $output | grep -v -qw -- "--remote" - if [ $? -ne 0 ]; then - die "Should not have --remote flag" + if grep -- " --remote " <<<"$output"; then + die "podman --help, with CONTAINER_CONNECTION set, is showing --remote" fi } |