MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / parseJSON

Function parseJSON

internal/server/server_test.go:64–69  ·  view source on GitHub ↗
(t *testing.T, rr *httptest.ResponseRecorder, v interface{})

Source from the content-addressed store, hash-verified

62}
63
64func parseJSON(t *testing.T, rr *httptest.ResponseRecorder, v interface{}) {
65 t.Helper()
66 if err := json.Unmarshal(rr.Body.Bytes(), v); err != nil {
67 t.Fatalf("failed to parse JSON response: %v\nBody: %s", err, rr.Body.String())
68 }
69}
70
71func TestHealthEndpoint(t *testing.T) {
72 srv := testServer(t)

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected