MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / getStringFromResponse

Function getStringFromResponse

main_test.go:1332–1341  ·  view source on GitHub ↗
(t *testing.T, r io.Reader)

Source from the content-addressed store, hash-verified

1330}
1331
1332func getStringFromResponse(t *testing.T, r io.Reader) string {
1333 if r == nil {
1334 t.Fatalf("unexpected nil reader")
1335 }
1336 response, err := io.ReadAll(r)
1337 if err != nil {
1338 t.Fatalf("unexpected err while reading: %s", err)
1339 }
1340 return string(response)
1341}
1342
1343func checkResponse(t *testing.T, r io.Reader, expected string) {
1344 got := getStringFromResponse(t, r)

Callers 2

TestServeFunction · 0.85
checkResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected