Files
netbird/e2e
mlsmaycon 41c0717f59 [e2e] Let a suite outside this repo use the harness
The harness package documents itself as feature-agnostic — "any suite can ask for
a live management server" — but three details assume the caller lives in this
repo, so the terraform provider's acceptance suite cannot use it and would have to
carry a second harness for the same product instead.

repoRoot walked up from the working directory to the first go.mod and used it as
the Docker build context. From another module that is the caller's own root, where
combined/Dockerfile.multistage does not exist. Require the ancestor to be this
module, and fall back to asking the go tool where this module's source is. For a
dependent that is the extracted module directory of the version it pins, which is
the right context: the server it tests against is then built from the same
revision as the client library it was compiled against.

Geolocation was off unconditionally, in both the container environment and
disableGeoliteUpdate. That is right for agent-network ingest, which does not use
it, but a suite asserting on location-based posture checks needs the database:
management evaluates those rules against it, and a rule it cannot evaluate fails
rather than passing without having been checked. StartCombined now takes options,
with WithGeolocation to keep the download, and WithServerEnv as the general escape
hatch for settings the harness does not model.

StartClient pinned a single network alias and set no hostname, so a second agent
could not start — the alias collides — and the peer's name was whatever the
container got. Both matter to a suite whose fixtures address peers by name:
management records the container hostname at registration, so that is the name the
peer appears under in the API. WithClientName sets alias and hostname together.

All three are additive. StartCombined(ctx) and StartClient(ctx, c, key) still
compile and behave as before, which the existing agent-network suite exercises.

The options configure a container environment and a config file, both assembled
before anything starts, so options_test.go checks them without Docker. A wiring
mistake would otherwise surface as a puzzling failure minutes into a container
run — and the argument order in the config format string is exactly the kind of
thing worth pinning, since a misplaced verb there fails the server's startup.
2026-08-12 05:45:54 +00:00
..