Skip to content

Use configurable container runtime in e2e tests instead of hardcoded Docker commands - #358

Open
sammcgeown wants to merge 4 commits into
hashicorp:mainfrom
sammcgeown:fix-hardcoded-docker
Open

Use configurable container runtime in e2e tests instead of hardcoded Docker commands#358
sammcgeown wants to merge 4 commits into
hashicorp:mainfrom
sammcgeown:fix-hardcoded-docker

Conversation

@sammcgeown

Copy link
Copy Markdown
Contributor

The e2e test flow hardcoded docker in test helper commands, even though the Makefile already supports a configurable container runtime via DOCKER variable.

That caused make test-e2e to fail in environments using Podman or another Docker-compatible runtime, because the Go tests ignored the configured runtime and invoked docker directly.

Changes Made

  • Added a shared helper in the e2e test package to resolve the container runtime from the DOCKER environment variable.
  • Kept a docker fallback so existing Docker-based workflows continue to work unchanged.
  • Replaced hardcoded docker invocations in e2e test helpers with the resolved runtime.
  • Updated the test-e2e Makefile target to export DOCKER=$(DOCKER) into the Go test process so the tests use the same runtime as the Makefile.

Why This Fix

  • Aligns the Go e2e tests with the existing Makefile configuration.
  • Allows make test-e2e to work with Podman without requiring local aliases or manual edits.
  • Preserves backward compatibility for Docker users.

Scope

Test infrastructure only.
No changes to server runtime behaviour or production container images.

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

sammcgeown added 3 commits May 8, 2026 11:48
…KER env var with a docker fallback

Replace all hardcoded docker strings in both test files
Export DOCKER= from the Makefile's test-e2e target so the env var reaches the Go test process
…KER env var with a docker fallback

Replace all hardcoded docker strings in both test files
Export DOCKER=$(DOCKER) from the Makefile's test-e2e target so the env var reaches the Go test process
@sammcgeown
sammcgeown requested a review from a team as a code owner May 8, 2026 12:46
@sammcgeown
sammcgeown force-pushed the fix-hardcoded-docker branch from b82cdae to 367ccf1 Compare May 8, 2026 12:52
@sammcgeown
sammcgeown force-pushed the fix-hardcoded-docker branch from 367ccf1 to c6c00d2 Compare May 8, 2026 12:53
@gautambaghel

Copy link
Copy Markdown
Member

this is cool, should help us support podman :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants