Files
netbird/e2e/harness/doc.go
mlsmaycon 4a296c5338 [e2e] Add container-based agent-network e2e harness (Pillar 1)
Introduce a self-contained, OIDC-free e2e harness that stands up NetBird
in containers, so suites no longer depend on the hand-maintained Tilt
stack or a real IdP.

- harness brings up the combined server (management + signal + relay +
  STUN + embedded IdP) in a single container built from
  combined/Dockerfile.multistage, and mints an admin PAT through the
  unauthenticated /api/setup bootstrap (NB_SETUP_PAT_ENABLED). API access
  goes through the existing shared/management/client/rest typed client.
- the image is built via the docker CLI (BuildKit) so the Dockerfile's
  cache mounts are honored; testcontainers then runs the tagged image.
- everything is behind the `e2e` build tag so normal builds and unit
  tests never pull in testcontainers.

Adds BuildKit cache mounts to combined/Dockerfile.multistage so source
changes recompile incrementally rather than from scratch.

Pillar 1 proven by TestCombinedBootstrap: server builds, boots, mints a
PAT, and the PAT authenticates a real management API call.
2026-06-28 18:39:20 +02:00

14 lines
675 B
Go

//go:build e2e
// Package harness provides a self-contained, OIDC-free way to stand up NetBird
// components in containers for end-to-end tests. It is feature-agnostic: any
// suite can ask for a live management server (with an admin PAT minted through
// the unauthenticated /api/setup bootstrap) and, later, a proxy and client.
//
// The harness compiles each component once in a cached builder container and
// mounts the resulting binary into a slim runtime container, so iterating on a
// branch doesn't pay a full image rebuild per run. Everything is gated behind
// the `e2e` build tag so normal builds and unit tests never pull in
// testcontainers.
package harness