Skip to content

e2e: isolate Docker networks for parallel integration tests - #64

Merged
philipgough merged 2 commits into
rhobs:rhobs-obs-api-konfluxfrom
redhat-chai-bot:chai-bot/e2e-isolate-docker-networks
Oct 1, 2026
Merged

philipgough merged 2 commits into
rhobs:rhobs-obs-api-konfluxfrom
redhat-chai-bot:chai-bot/e2e-isolate-docker-networks

Conversation

@redhat-chai-bot

Copy link
Copy Markdown

Cherry-pick two upstream commits that fix Docker network name collisions
during parallel e2e test execution.

Problem

Multiple e2e tests (e.g. TestMetricsReadAndWrite + TestOpenAPIEndpoint)
share the same Docker network name ("metrics") and both call t.Parallel().
When running concurrently, efficientgo/e2e's e2e.New() cleans up the
existing Docker network, destroying the other test's running containers.
This causes opa container startup failures, connection refused errors,
and container cleanup races.

Upstream commits

  • bdbc2623e84b — "e2e: isolate Docker networks for parallel integration tests"
    Adds uniqueE2ENetworkName(t) function, refactors all test files to use
    per-test network names instead of shared constants.

  • 85627d9b12e5 — "e2e: fix Dex token TLS verification for test CA and CI"
    Companion fix: adds host.docker.internal to cert SANs for per-test
    TLS verification.

Verification

All four make targets pass locally:

  • make build ✅
  • make test --always-make ✅
  • make lint --always-make ✅
  • make generate validate ✅

Ref: RHOBS-1792


AI-generated. Review for accuracy.

@philipgough requested from Slack

Use a per-test network name derived from t.Name() with e2e.WithName, since bare
e2e.New() hashes runtime.Caller(3) and collides on testing.tRunner for every
test. Derive TLS/OIDC hostnames from e.Name() via getContainerName, drop fixed
env name constants, and align Dex/tenant API host with the observatorium-api
runnable.
Sign leaves with the parsed CA so AuthorityKeyId matches SubjectKeyId on ca.pem.
Add host.docker.internal to Dex/API SANs, set tls.ServerName to the Dex Docker
hostname when posting to dex/token, and fail if ca.pem does not parse into the
root pool.
@philipgough
philipgough merged commit 0077287 into rhobs:rhobs-obs-api-konflux Oct 1, 2026
5 checks passed
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.

3 participants