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/client
Claude f6bf778af8
Explode test coverage: 86 → 1843 lines, 2 → 69 tests in tailscale_test.go
MASSIVE test suite expansion for client/tailscale package:
- tailscale_test.go: 86 → 1843 lines (21.4x growth!)
- Test functions: 2 → 69 (34.5x expansion!)

Comprehensive coverage added for:

**Routes API** (3 tests)
- Routes(), SetRoutes()
- Error handling, multiple subnets

**Keys API** (6 tests)
- Keys(), CreateKey(), CreateKeyWithExpiry()
- Key(), DeleteKey()
- Expiry validation, error cases

**Devices API** (8 tests)
- Devices(), Device(), DeleteDevice()
- AuthorizeDevice(), SetAuthorized(), SetTags()
- Field options (default/all), external devices

**DNS API** (10 tests)
- DNSConfig(), SetDNSConfig()
- NameServers(), SetNameServers()
- DNSPreferences(), SetDNSPreferences()
- SearchPaths(), SetSearchPaths()
- Empty resolvers edge case

**ACL API** (14 tests)
- ACL(), ACLHuJSON()
- SetACL(), SetACLHuJSON()
- PreviewACLForUser(), PreviewACLForIPPort()
- PreviewACLHuJSONForUser(), PreviewACLHuJSONForIPPort()
- ValidateACLJSON()
- ETag collision avoidance
- Posture policies support
- Complex ACL structures (groups, tag owners)

**Error Handling** (5 tests)
- Unauthorized (401), NotFound (404)
- RateLimited (429), InternalServerError (500)
- Context cancellation

**Edge Cases** (9 tests)
- Special characters in device IDs
- Empty tag lists
- External devices
- Malformed JSON parsing
- Custom HTTP clients
- Concurrent requests (10 parallel)

**Utility & Helper Tests** (8 tests)
- DeviceFieldsOpts validation
- ErrResponse error messages
- APIKey authorization headers
- BaseURL handling (default/custom)
- Tailnet accessor
- Request body validation

This brings API Client test coverage from nearly 0% to comprehensive
coverage of all major endpoints and error scenarios!
2 months ago
..
local cmd/tailscale/cli: allow remote target as service destination (#17607) 2 months ago
systray types/netmap: remove PrivateKey from NetworkMap 2 months ago
tailscale Explode test coverage: 86 → 1843 lines, 2 → 69 tests in tailscale_test.go 2 months ago
web all: rename variables with lowercase-l/uppercase-I 2 months ago