MCPcopy Index your code
hub / github.com/tailscale/tailscale / TestRateLimitErrorIsError

Function TestRateLimitErrorIsError

control/controlclient/direct_test.go:223–232  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

221}
222
223func TestRateLimitErrorIsError(t *testing.T) {
224 err := &rateLimitError{msg: "test", retryAfter: 5 * time.Second}
225 var target *rateLimitError
226 if !errors.As(err, &target) {
227 t.Fatal("errors.As should match *rateLimitError")
228 }
229 if target.retryAfter != 5*time.Second {
230 t.Errorf("retryAfter = %v, want 5s", target.retryAfter)
231 }
232}
233
234func TestTsmpPing(t *testing.T) {
235 hi := hostinfo.New()

Callers

nothing calls this directly

Calls 3

FatalMethod · 0.65
ErrorfMethod · 0.65
AsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…