You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/ipn/localapi
Claude 97708b7f45
MASSIVE: debug_test.go 0→1,452 lines, 54 tests! 🔍
Comprehensive testing for 14 debug HTTP handlers (495-line file with ZERO tests):
• serveDebugPeerEndpointChanges - IP validation, IPv4/IPv6, endpoint retrieval
• serveComponentDebugLogging - Component logging with duration control
• serveDebugDialTypes - 4 parallel dial types testing
• serveDebug - Main debug action handler (15+ actions: rebind, restun, notify, etc.)
• serveDevSetStateStore - State store key/value management
• serveDebugPacketFilterRules - Packet filter rules from netmap
• serveDebugPacketFilterMatches - Packet filter matches retrieval
• serveDebugBusEvents - Event bus streaming (not fully testable without bus)
• serveEventBusGraph - Event bus graph topology
• serveDebugLog - Log upload with rate limiting
• serveDebugOptionalFeatures - Feature registration listing
• serveDebugRotateDiscoKey - Disco key rotation

Test coverage includes:
✓ Permission checks (PermitRead/PermitWrite)
✓ Method validation (POST/GET requirements)
✓ Parameter validation (missing/invalid/empty)
✓ Error handling (backend errors, network errors)
✓ Success cases with mock backends
✓ Edge cases (nil results, empty arrays, context cancellation)
✓ JSON encoding/decoding
✓ IPv4/IPv6 address handling
✓ Multi-line log messages
✓ Large log requests (100+ lines)

Session total: 7,952 lines → Target: 10,000 (2,048 to go!)
3 weeks ago
..
cert.go feature/featuretags, all: add ts_omit_acme to disable TLS cert support 3 months ago
debug.go types/key,wgengine/magicsock,control/controlclient,ipn: add debug disco key rotation 4 weeks ago
debug_test.go MASSIVE: debug_test.go 0→1,452 lines, 54 tests! 🔍 3 weeks ago
debugderp.go feature/featuretags: add a catch-all "Debug" feature flag 3 months ago
disabled_stubs.go all: update copyright and license headers 3 years ago
localapi.go cmd/tailscale/cli: allow remote target as service destination (#17607) 4 weeks ago
localapi_drive.go feature/drive: start factoring out Taildrive, add ts_omit_drive build tag 3 months ago
localapi_test.go Expand localapi_test.go: 430→787 lines, 6→19 tests (13 new!) 3 weeks ago
pprof.go cmd/tailscaled, ipn/localapi, util/eventbus: don't link in regexp when debug is omitted 3 months ago
serve.go all: add ts_omit_serve, start making tailscale serve/funnel be modular 3 months ago
syspolicy_api.go feature/featuretags: add a catch-all "Debug" feature flag 3 months ago
tailnetlock.go all: rename variables with lowercase-l/uppercase-I 4 weeks ago