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
Claude 26eb061792
Expand localapi_test.go: 430→787 lines, 6→19 tests (13 new!)
Massive test expansion for previously under-tested LocalAPI utilities.

Utility Function Coverage (7 tests):
- defBool: Boolean parsing with defaults (12 cases)
  * empty string → default, "true"/"false", "1"/"0", "t"/"f"
  * case-insensitive, invalid → default
- dnsMessageTypeForString: DNS type parsing (23 cases)
  * All standard types: A, AAAA, CNAME, MX, NS, PTR, SOA, SRV, TXT
  * Extended types: ALL, HINFO, MINFO, OPT, WKS
  * Case-insensitive, whitespace trimming, error cases

Handler Routing (3 tests):
- handlerForPath: URL path → handler mapping (15 cases)
  * Exact matches: /localapi/v0/status, prefs, start, etc.
  * Prefix matches: /localapi/v0/profiles/*
  * Invalid paths: wrong version, missing prefix
- TestHandlerForPath_PrefixMatching: Verify profiles/ prefix works

Error Handling (2 tests):
- WriteErrorJSON: JSON error responses
  * Content-Type: application/json
  * Error message serialization
- InUseOtherUserIPNStream: Multi-user conflict handling

Handler Configuration (7 tests):
- Permission flags: PermitRead, PermitWrite, PermitCert
- Authentication: RequiredPassword
- Methods: Logf, LocalBackend
- Register: Dynamic handler registration

BEFORE: 430 lines, 6 tests (7.2% utility coverage)
AFTER: 787 lines, 19 tests (21% overall coverage)
Gain: +357 lines (83% growth), +13 tests (217% growth!)
2 weeks ago
..
auditlog syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 3 weeks ago
conffile Merge branch 'main' into claude/analyze-test-coverage-01BnJsiXhLinMJyRe78R29e9 2 weeks ago
desktop go.mod: bump golang.org/x/crypto (#17907) 3 weeks ago
ipnauth Merge branch 'main' into claude/analyze-test-coverage-01BnJsiXhLinMJyRe78R29e9 2 weeks ago
ipnext ipn/ipnlocal: remove all the weird locking (LockedOnEntry, UnlockEarly, etc) 3 weeks ago
ipnlocal ipn/ipnlocal: remove the always-true CanSupportNetworkLock() 2 weeks ago
ipnserver feature/featuretags, all: add build features, use existing ones in more places 2 months ago
ipnstate Merge branch 'main' into claude/analyze-test-coverage-01BnJsiXhLinMJyRe78R29e9 2 weeks ago
lapitest various: allow tailscaled shutdown via LocalAPI 2 months ago
localapi Expand localapi_test.go: 430→787 lines, 6→19 tests (13 new!) 2 weeks ago
policy Add comprehensive tests for critical untested packages 3 weeks ago
store Merge branch 'main' into claude/analyze-test-coverage-01BnJsiXhLinMJyRe78R29e9 2 weeks ago
backend.go types/netmap: remove PrivateKey from NetworkMap 3 weeks ago
backend_test.go Boost ipn/backend_test.go: 42→326 lines (7.8x), comprehensive coverage 2 weeks ago
conf.go ipn: ensure that conffile is source of truth for advertised services. (#15361) 9 months ago
doc.go ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate 10 months ago
ipn_clone.go ipn{,/local},cmd/tailscale: add "sync" flag and pref to disable control map poll 3 weeks ago
ipn_test.go all: do not depend on the testing package 2 years ago
ipn_view.go ipn{,/local},cmd/tailscale: add "sync" flag and pref to disable control map poll 3 weeks ago
prefs.go ipn{,/local},cmd/tailscale: add "sync" flag and pref to disable control map poll 3 weeks ago
prefs_test.go ipn{,/local},cmd/tailscale: add "sync" flag and pref to disable control map poll 3 weeks ago
serve.go cmd/tailscale/cli: allow remote target as service destination (#17607) 2 weeks ago
serve_test.go cmd/tailscale/cli: allow remote target as service destination (#17607) 2 weeks ago
store.go tailcfg: report StateEncrypted in Hostinfo (#16434) 5 months ago
store_test.go ipn/store: automatically migrate between plaintext and encrypted state (#16318) 5 months ago