diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-07-14 13:32:55 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2022-07-26 13:34:12 -0400 |
commit | e4b82c77f7214a6d69c2a6112900dae92d505dc6 (patch) | |
tree | 02fb338baf35259592b4dc957f502fe7c3efa942 /test/system/250-systemd.bats | |
parent | 183fdea5f595886c799f804d3e7483d3bb0139c8 (diff) | |
download | podman-e4b82c77f7214a6d69c2a6112900dae92d505dc6.tar.gz podman-e4b82c77f7214a6d69c2a6112900dae92d505dc6.tar.bz2 podman-e4b82c77f7214a6d69c2a6112900dae92d505dc6.zip |
Add --host and -H as equivalent options to --url
Docker supports -H and --host for specify the listening socket. Podman
should support them also in order to match the CLI.
These will not be documented since Podman defaults to using the
--url option.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/system/250-systemd.bats')
-rw-r--r-- | test/system/250-systemd.bats | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats index fc3c33975..70ae76eb8 100644 --- a/test/system/250-systemd.bats +++ b/test/system/250-systemd.bats @@ -400,4 +400,23 @@ EOF run_podman rm -f -t 0 $cname } +@test "podman-system-service containers --host" { + skip_if_remote "N/A under podman-remote" + + SERVICE_NAME=podman-service-$(random_string) + port=$(random_free_port) + URL=tcp://127.0.0.1:$port + + systemd-run --unit=$SERVICE_NAME $PODMAN system service $URL --time=0 + wait_for_port 127.0.0.1 $port + + run_podman --host $URL run --rm $IMAGE true + run_podman -H $URL run --rm $IMAGE true + + systemctl stop $SERVICE_NAME + + # Make sure the option is actually connecting + run_podman 125 --host $URL run --rm $IMAGE true + assert "$output" =~ "Cannot connect to Podman.*connection refused" +} # vim: filetype=sh |