Skip to content

Commit

Permalink
Add test for legacy address without two slashes
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
afbjorklund committed Sep 12, 2023
1 parent 336055f commit 6f4f941
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/system/251-system-service.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6f4f941

Please sign in to comment.