Add test for legacy address without two slashes

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 <anders.f.bjorklund@gmail.com>
This commit is contained in:
Anders F Björklund
2023-09-11 11:46:58 +02:00
parent 336055fe3b
commit 6f4f941373

View File

@ -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)