test(e2e): pin direct podman calls to harness socket on macOS - #2909
Merged
johntmyers merged 1 commit intoAug 24, 2026
Merged
Conversation
The podman_gateway_start e2e test shells out to `podman` directly (unlike every other Podman e2e test, which routes through the gateway). The harness `e2e/with-podman-gateway.sh` clobbers `XDG_CONFIG_HOME` with an empty dir to isolate CLI/SDK gateway metadata. On macOS the podman client resolves its VM connection config from `XDG_CONFIG_HOME`, so a bare `podman ps` falls back to a nonexistent native rootless socket and fails with "unable to connect to Podman socket". On Linux the socket resolves via `XDG_RUNTIME_DIR`, so the test passes there and this is a macOS-only false failure. Target the same API socket the gateway uses by passing `--url unix://$SOCKET` when the harness-exported `OPENSHELL_PODMAN_SOCKET` is set, mirroring the shell's `podman_cmd` helper. When the var is unset (running the test outside the harness), fall back to plain `podman`, so Linux behavior is unchanged. Signed-off-by: Russell Bryant <rbryant@redhat.com>
russellb
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
August 24, 2026 16:49
johntmyers
approved these changes
Aug 24, 2026
Collaborator
|
/ok to test ce61ccf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a macOS-only false failure in the Podman e2e harness. On macOS,
CONTAINER_ENGINE=podman mise run e2e:podmanfailed one test,podman_gateway_start.rs::podman_gateway_restart_preserves_running_and_stopped_intent,with:
This is a test-environment bug, not a product bug, and it does not reproduce on Linux CI.
Related Issue
No linked issue. This is an obvious, localized bug fix in the e2e test harness
(macOS-only, no user-facing or product behavior change), which the contribution
conventions allow to proceed without an issue.
Changes
podman_gateway_start.rsis the only Podman e2e test that shells out topodmandirectly (
Command::new("podman")insandbox_container_running); every otherPodman e2e test drives the gateway, which uses the pinned
OPENSHELL_PODMAN_SOCKET.The harness (
e2e/with-podman-gateway.sh) exportsXDG_CONFIG_HOMEpointed at anempty directory to isolate CLI/SDK gateway metadata. On macOS the podman client
resolves its VM connection config from
XDG_CONFIG_HOME, so with it stripped abare
podman psfalls back to a nonexistent native rootless socket and fails. OnLinux, rootless podman resolves its socket via
XDG_RUNTIME_DIR, so the test passesthere — hence the macOS-only failure.
podman_command()helper that passes--url unix://$OPENSHELL_PODMAN_SOCKETwhen the harness-exported
OPENSHELL_PODMAN_SOCKETis set, targeting the exact socketthe gateway uses and bypassing connection-config resolution — mirroring the shell's
podman_cmd/with_podman_confighelpers.podman psandpodman inspectcalls.OPENSHELL_PODMAN_SOCKETis unset (running the test outside the harness), fallback to plain
podman, so Linux behavior is unchanged.Scope is limited to the e2e test harness; no product code is touched.
Testing
XDG_CONFIG_HOME=$(mktemp -d) podman ps→ fails with the exact reportedstorage-runsocket error.XDG_CONFIG_HOME=$(mktemp -d) podman --url "unix://$SOCK" ps→ succeeds.mise run pre-commit→ passed.OPENSHELL_E2E_PODMAN_TEST=podman_gateway_start CONTAINER_ENGINE=podman mise run e2e:podman→
test result: ok. 1 passed(previously failing test now passes).CONTAINER_ENGINE=podman mise run e2e:podman— the previouslyfailing
podman_gateway_startnow passes. All other Podman test files up to thatpoint pass. One unrelated test,
provider_refresh_handles::long_running_process_survives_rotations_and_reconfigure_revokes,fails on this macOS machine with
Error: "initial long-running credential probe failed"(sandbox container exits 137). It reproduces in isolation and shares no code with this
single-file change, so it is a pre-existing, unrelated macOS-environment failure; cargo's
fail-fast then skips the remaining files. It is out of scope for this fix.
OPENSHELL_PODMAN_SOCKETis set the test nowtargets that exact socket (the same one the gateway uses); when unset it behaves exactly
as before.
Checklist
mise run pre-commitpassed.