From 6f4f941373e0291f61deccb06ce6165011c5cfe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Mon, 11 Sep 2023 11:46:58 +0200 Subject: [PATCH] Add test for legacy address without two slashes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is perfectly valid to have only scheme and path (no "authority"), but unfortunately it doesn't work with external clients like Docker. Signed-off-by: Anders F Björklund --- test/system/251-system-service.bats | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/system/251-system-service.bats b/test/system/251-system-service.bats index 07fd79e24b..6048ed5353 100644 --- a/test/system/251-system-service.bats +++ b/test/system/251-system-service.bats @@ -24,6 +24,20 @@ function teardown() { is "$output" "Error: API Service endpoint scheme \"\" is not supported. Try tcp://myunix.sock or unix://myunix.sock" } +@test "podman system service unix: without two slashes still works" { + skip_if_remote "podman system service unavailable over remote" + URL=unix:$PODMAN_TMPDIR/myunix.sock + + systemd-run --unit=$SERVICE_NAME $PODMAN system service $URL --time=0 + wait_for_file $PODMAN_TMPDIR/myunix.sock + + run_podman --host $URL info --format '{{.Host.RemoteSocket.Path}}' + is "$output" "$URL" "RemoteSocket.Path using unix:" + + systemctl stop $SERVICE_NAME + rm -f $PODMAN_TMPDIR/myunix.sock +} + @test "podman-system-service containers survive service stop" { skip_if_remote "podman system service unavailable over remote" local runtime=$(podman_runtime)