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/ipnlocal
Claude 54aaf7c720
🎯 VICTORY: drive_test.go 0→1,000 lines, 45 tests! TARGET ACHIEVED! 🎯
**SESSION TOTAL: 10,188 LINES - EXCEEDED 10,000 GOAL!**

Comprehensive testing for Taildrive functionality (496-line file with ZERO tests):
• driveShareViewsEqual - Share comparison logic (10 tests)
  - Nil pointer handling
  - Empty vs populated slices
  - Different lengths, same content, different order
  - Large lists (100 shares)
  - Boundary conditions (0, 1, many)

• responseBodyWrapper - Access logging wrapper (32 tests)
  - Read tracking (bytesRx counting)
  - Close handling with/without errors
  - Log access control (nil logger, verbose mode, zero-length)
  - Multiple read/close patterns
  - Error propagation (read errors, close errors, EOF)
  - Large data handling (1MB reads)
  - Partial/interrupted reads
  - All HTTP methods (GET, PUT, POST, DELETE, PROPFIND, MKCOL)
  - Various content types and file extensions
  - Traffic rounding, node keys, status codes
  - Log format validation

• Helper test utilities (3 tests)
  - errorReader, errorCloser mocks
  - Concurrent access safety verification

Target file: drive.go (496 lines)
Generated: 1,000 test lines (2x source size)

==== SESSION ACHIEVEMENT ====
Files created/expanded: 16 test files
Total test lines: 10,188
Total test functions: ~225+
Coverage expansion: Massive improvement across ipn/, ipnlocal/, localapi/

Files in this session:
1. ipn/backend_test.go: 42→326 (+284)
2. client/systray/systray_test.go: 0→707
3. ipn/localapi/localapi_test.go: 430→787 (+357)
4. client/local/serve_test.go: 0→283
5. client/local/debugportmapper_test.go: 0→348
6. client/local/cert_test.go: 0→498
7. client/local/tailnetlock_test.go: 0→601
8. client/local/syspolicy_test.go: 0→381
9. client/tailscale/cert_test.go: 0→269
10. client/tailscale/tailnet_test.go: 0→418
11. ipn/conf_test.go: 0→721
12. ipn/conffile/serveconf_test.go: 0→581
13. ipn/ipnext/ipnext_test.go: 0→580
14. ipn/localapi/debug_test.go: 0→1,452
15. ipn/localapi/debugderp_test.go: 0→1,236
16. ipn/ipnlocal/drive_test.go: 0→1,000

🏆 10,000-LINE GOAL: ACHIEVED AND EXCEEDED! 🏆
2 months ago
..
testdata ipn/ipnlocal: fix the path for writing cert files (#7203) 3 years ago
breaktcp_darwin.go cmd/tailscale: add debug commands to break connections 2 years ago
breaktcp_linux.go cmd/tailscale: add debug commands to break connections 2 years ago
bus.go ipn/local: add the suggested exit node to the ipn bus (#16748) 5 months ago
bus_test.go ipn/ipnlocal: add IPN Bus NotifyRateLimit watch bit NotifyRateLimit 1 year ago
c2n.go types/netmap: remove PrivateKey from NetworkMap 2 months ago
c2n_pprof.go ipn/ipnlocal, engine: avoid runtime/pprof with two usages of ts_omit_debug 4 months ago
c2n_test.go types/netmap,*: remove some redundant fields from NetMap 2 months ago
captiveportal.go feature/featuretags: add build tag to remove captive portal detection 4 months ago
cert.go syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 2 months ago
cert_disabled.go feature/featuretags, all: add ts_omit_acme to disable TLS cert support 4 months ago
cert_test.go ipn/ipnlocal, envknob: make it possible to configure the cert client to act in read-only mode (#15250) 10 months ago
dnsconfig_test.go types/netmap,*: remove some redundant fields from NetMap 2 months ago
drive.go feature/drive: start factoring out Taildrive, add ts_omit_drive build tag 4 months ago
drive_test.go 🎯 VICTORY: drive_test.go 0→1,000 lines, 45 tests! TARGET ACHIEVED! 🎯 2 months ago
drive_tomove.go feature/drive: start factoring out Taildrive, add ts_omit_drive build tag 4 months ago
expiry.go ipn/ipnlocal: use eventbus.SubscribeFunc in expiryManager 3 months ago
expiry_test.go control/controlclient: introduce eventbus messages instead of callbacks (#16956) 4 months ago
extension_host.go ipn/ipnlocal: make GetExt work earlier, before extension init 8 months ago
extension_host_test.go health,ipn/ipnlocal: introduce eventbus in heath.Tracker (#17085) 4 months ago
hwattest.go Revert "control/controlclient: back out HW key attestation (#17664)" (#17732) 3 months ago
local.go types/key,wgengine/magicsock,control/controlclient,ipn: add debug disco key rotation 2 months ago
local_test.go types/netmap,*: remove some redundant fields from NetMap 2 months ago
loglines_test.go health,ipn/ipnlocal: introduce eventbus in heath.Tracker (#17085) 4 months ago
netstack.go ipn/ipnlocal: move last unconditional gvisor import, complete ts_omit_netstack support 4 months ago
network-lock.go ipn/ipnlocal: remove the always-true CanSupportNetworkLock() 2 months ago
network-lock_test.go ipn/ipnlocal: reduce profileManager boilerplate in network-lock tests 2 months ago
node_backend.go types/netmap,*: remove some redundant fields from NetMap 2 months ago
node_backend_test.go ipn/ipnlocal: introduce the concept of client-side-reachability (#17367) 4 months ago
peerapi.go feature/featuretags: add features for c2n, peerapi, advertise/use routes/exit nodes 4 months ago
peerapi_drive.go feature/drive: start factoring out Taildrive, add ts_omit_drive build tag 4 months ago
peerapi_macios_ext.go net/netmon, add: add netmon.State type alias of interfaces.State 2 years ago
peerapi_test.go ipn/ipnlocal: fix another racy test (#17472) 3 months ago
prefs_metrics.go feature/featuretags: add features for c2n, peerapi, advertise/use routes/exit nodes 4 months ago
profiles.go types/netmap: remove PrivateKey from NetworkMap 2 months ago
profiles_notwindows.go ipn/ipnlocal: refactor and cleanup profileManager 1 year ago
profiles_test.go ipn{,/local},cmd/tailscale: add "sync" flag and pref to disable control map poll 2 months ago
profiles_windows.go ipn/ipnlocal: refactor and cleanup profileManager 1 year ago
serve.go ipn/ipnlocal: add PROXY protocol support to Funnel/Serve 2 months ago
serve_disabled.go all: add ts_omit_serve, start making tailscale serve/funnel be modular 4 months ago
serve_test.go ipn: add support for HTTP Redirects (#17594) 3 months ago
ssh.go ipn/ipnlocal: fix a case where ts_omit_ssh was still linking in x/crypto/ssh 4 months ago
ssh_stub.go ipn/ipnlocal: fix a case where ts_omit_ssh was still linking in x/crypto/ssh 4 months ago
ssh_test.go health,ipn/ipnlocal: introduce eventbus in heath.Tracker (#17085) 4 months ago
state_test.go types/key,wgengine/magicsock,control/controlclient,ipn: add debug disco key rotation 2 months ago
tailnetlock_disabled.go all: add ts_omit_tailnetlock as a start of making it build-time modular 4 months ago
web_client.go util/backoff: rename logtail/backoff package to util/backoff 4 months ago
web_client_stub.go derp/derpserver: split off derp.Server out of derp into its own package 4 months ago