MCPcopy
hub / github.com/tailscale/tailscale / TestDebuggerURL

Function TestDebuggerURL

tsweb/debug_test.go:99–113  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

97}
98
99func TestDebuggerURL(t *testing.T) {
100 mux := http.NewServeMux()
101 dbg := Debugger(mux)
102 dbg.URL("https://www.tailscale.com", "Homepage")
103
104 code, body := get(mux, "/debug/", tsIP)
105 if code != 200 {
106 t.Fatalf("debug access failed, got %v", code)
107 }
108 for _, want := range []string{"https://www.tailscale.com", "Homepage"} {
109 if !strings.Contains(body, want) {
110 t.Errorf("want %q in output, not found", want)
111 }
112 }
113}
114
115func TestDebuggerSection(t *testing.T) {
116 mux := http.NewServeMux()

Callers

nothing calls this directly

Calls 6

URLMethod · 0.80
DebuggerFunction · 0.70
getFunction · 0.70
FatalfMethod · 0.65
ErrorfMethod · 0.65
ContainsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…