headscale/hscontrol
Kristoffer Dalby 3d53f97c82 hscontrol/servertest: fix test expectations for eventual consistency
Three corrections to issue tests that had wrong assumptions about
when data becomes available:

1. initial_map_should_include_peer_online_status: use WaitForCondition
   instead of checking the initial netmap. Online status is set by
   Connect() which sends a PeerChange patch after the initial
   RegisterResponse, so it may not be present immediately.

2. disco_key_should_propagate_to_peers: use WaitForCondition. The
   DiscoKey is sent in the first MapRequest (not RegisterRequest),
   so peers may not see it until a subsequent map update.

3. approved_route_without_announcement: invert the test expectation.
   Tailscale uses a strict advertise-then-approve model -- routes are
   only distributed when the node advertises them (Hostinfo.RoutableIPs)
   AND they are approved. An approval without advertisement is a dormant
   pre-approval. The test now asserts the route does NOT appear in
   AllowedIPs, matching upstream Tailscale semantics.

Also fix TestClient.Reconnect to clear the cached netmap and drain
pending updates before re-registering. Without this, WaitForPeers
returned immediately based on the old session's stale data.
2026-03-19 07:05:58 +01:00
..
assets Swap favicon for updated version 2026-03-03 05:59:40 +01:00
capver capver: regenerate from docker tags 2026-02-07 08:23:51 +01:00
db all: fix test flakiness and improve test infrastructure 2026-03-14 02:52:28 -07:00
derp all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
dns Fix typo in comment about fsnotify behavior 2026-02-27 15:23:06 +01:00
mapper hscontrol/poll,state: fix grace period disconnect TOCTOU race 2026-03-19 07:05:58 +01:00
policy all: fix test flakiness and improve test infrastructure 2026-03-14 02:52:28 -07:00
routes all: upgrade to Go 1.26rc2 and modernize codebase 2026-02-08 12:35:23 +01:00
servertest hscontrol/servertest: fix test expectations for eventual consistency 2026-03-19 07:05:58 +01:00
state hscontrol/state: fix online status reset during re-registration 2026-03-19 07:05:58 +01:00
templates templates: generalise auth templates for web and OIDC 2026-02-25 21:28:05 +01:00
types all: fix test flakiness and improve test infrastructure 2026-03-14 02:52:28 -07:00
util mapper/batcher: restructure internals for correctness 2026-03-14 02:52:28 -07:00
app.go hscontrol: add servertest harness for in-process control plane testing 2026-03-19 07:05:58 +01:00
auth.go Update docs for auth-id changes 2026-03-01 13:38:22 +01:00
auth_tags_test.go auth: generalise auth flow and introduce AuthVerdict 2026-02-25 21:28:05 +01:00
auth_test.go all: fix test flakiness and improve test infrastructure 2026-03-14 02:52:28 -07:00
debug.go mapper: remove Batcher interface, rename to Batcher struct 2026-03-14 02:52:28 -07:00
grpcv1.go hscontrol, cli: add auth register and approve commands 2026-02-25 21:28:05 +01:00
grpcv1_test.go hscontrol: add tests for deleting users with tagged nodes 2026-02-20 21:51:00 +01:00
handlers.go Update docs for auth-id changes 2026-03-01 13:38:22 +01:00
metrics.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
noise.go noise: limit request body size to prevent unauthenticated OOM 2026-03-16 09:28:31 +01:00
noise_test.go noise: limit request body size to prevent unauthenticated OOM 2026-03-16 09:28:31 +01:00
oidc.go Update docs for auth-id changes 2026-03-01 13:38:22 +01:00
oidc_template_test.go templates: generalise auth templates for web and OIDC 2026-02-25 21:28:05 +01:00
oidc_test.go oidc: make email verification configurable 2025-12-18 11:42:32 +00:00
platform_config.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
poll.go hscontrol/poll,state: fix grace period disconnect TOCTOU race 2026-03-19 07:05:58 +01:00
poll_test.go poll: fix poll test linter violations 2026-03-12 01:27:34 -07:00
tailsql.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
templates_consistency_test.go templates: generalise auth templates for web and OIDC 2026-02-25 21:28:05 +01:00