MCPcopy Index your code
hub / github.com/maruel/panicparse / TestSnapshotHandler_Err

Function TestSnapshotHandler_Err

stack/webstack/webstack_test.go:38–57  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36}
37
38func TestSnapshotHandler_Err(t *testing.T) {
39 t.Parallel()
40 data := []string{
41 "/debug?augment=2",
42 "/debug?maxmem=abc",
43 "/debug?similarity=alike",
44 }
45 for _, url := range data {
46 url := url
47 t.Run(url, func(t *testing.T) {
48 t.Parallel()
49 req := httptest.NewRequest("GET", url, nil)
50 w := httptest.NewRecorder()
51 SnapshotHandler(w, req)
52 if w.Code != 400 {
53 t.Fatalf("%s: %d\n%s", url, w.Code, w.Body.String())
54 }
55 })
56 }
57}
58
59func TestSnapshotHandler_Method_POST(t *testing.T) {
60 t.Parallel()

Callers

nothing calls this directly

Calls 2

SnapshotHandlerFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…