tailscale/cmd/containerboot
Avery Pennarun 97e021d8ed fix flaky tests: improve test isolation and reliability
Test fixes for consistent pass rates under repeated runs (-count=N):

Global state isolation:
- appc: check metric deltas instead of absolute values
- cmd/derper: initialize DNS caches before test
- tsweb/varz: use unpublished expvar to avoid global registration
- wgengine/netstack: check metric deltas instead of absolute values
- net/dns: use SetForTest() with deferred restore for hooks

Timeout and concurrency:
- cmd/containerboot: increase wait loop timeouts for parallel load
- tsconsensus: add deadline to waitFor(), use sync.Once for netns
- tstest/integration: add tstest.Shard/Parallel, fix IPN bus watchers
- net/netcheck: set testCaptivePortalDelay to prevent hangs
- wgengine/magicsock: use Port:0, add timeout to callback wait
- drive/driveimpl: use http.Server for proper shutdown

Race conditions:
- tstest/archtest: remove !race from build constraint
- util/deephash: use local sink variable instead of package-level
- net/art: switch to math/rand/v2 for thread-safe globals
- tstest/integration: use Status() instead of MustStatus() from goroutines

Test optimization:
- net/udprelay: rewrite VNI test to avoid iterating all 16M values
- ipn/ipnlocal: reset env vars between subtests
- cmd/containerboot/serve: use SetWaitDurationForTest
- tsnet: wait for service VIP in AllowedIPs before dialing

Change-Id: Id6186fb8a45031920550a208ded77382e57cc016
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
2026-04-13 17:28:18 +02:00
..
egressservices_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
egressservices.go cmd/containerboot: fix error handling for egress (#18657) 2026-02-10 10:19:06 +00:00
forwarding.go all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
ingressservices_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
ingressservices.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
kube_test.go cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
kube.go cmd/{containerboot,k8s-operator}: reissue auth keys for broken proxies (#16450) 2026-03-11 10:25:57 +00:00
main_test.go fix flaky tests: improve test isolation and reliability 2026-04-13 17:28:18 +02:00
main.go cmd/k8s-operator: migrate to tailscale-client-go-v2 (#19010) 2026-04-09 14:39:46 +01:00
serve_test.go fix flaky tests: improve test isolation and reliability 2026-04-13 17:28:18 +02:00
serve.go cmd/containerboot,kube: enable autoadvertisement of Tailscale services on containerboot (#18527) 2026-02-20 15:52:34 -08:00
settings_test.go cmd/containerboot: handle v6 pod ips that are missing square brackets (#18519) 2026-02-03 11:16:59 +00:00
settings.go cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
tailscaled.go cmd/containerboot,kube: enable autoadvertisement of Tailscale services on containerboot (#18527) 2026-02-20 15:52:34 -08:00
test_tailscale.sh cmd/containerboot: make a tests table, add more tests. 2022-11-10 09:14:27 -08:00
test_tailscaled.sh cmd/containerboot: avoid leaking bash scripts after test runs 2023-09-21 13:17:48 -07:00