From 4f857bc10627d950b3363e47cee02ef07618f0ae Mon Sep 17 00:00:00 2001
From: Daniel J Walsh <dwalsh@redhat.com>
Date: Thu, 14 Oct 2021 14:50:26 -0400
Subject: If CONTAINER_HOST env variable is set default podman --remote=true

Users enabling CONTAINER_HOST==PATH is indicating to podman they intend
to use remote functionality.

Fixes: https://github.com/containers/podman/issues/11196

Update man pages to document all of the environment variables.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
---
 test/system/001-basic.bats | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'test/system')

diff --git a/test/system/001-basic.bats b/test/system/001-basic.bats
index 2e5ebe4a3..2de96a01a 100644
--- a/test/system/001-basic.bats
+++ b/test/system/001-basic.bats
@@ -93,6 +93,15 @@ function setup() {
     is "$output" "Error: unknown flag: --remote" "podman version --remote"
 }
 
+@test "podman-remote: defaults" {
+    if is_remote; then
+        skip "only applicable on a local run"
+    fi
+
+    CONTAINER_HOST=foobar run_podman --log-level=info --help
+    is "$output" ".*defaulting to '--remote=true'" "CONTAINER_HOST sets --remote true"
+}
+
 # Check that just calling "podman-remote" prints the usage message even
 # without a running endpoint. Use "podman --remote" for this as this works the same.
 @test "podman-remote: check for command usage message without a running endpoint" {
-- 
cgit v1.2.3-54-g00ecf