MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / NewTestServer

Function NewTestServer

testutil/test_server.go:58–67  ·  view source on GitHub ↗

NewTestServer creates and starts new http.TestServer

()

Source from the content-addressed store, hash-verified

56
57// NewTestServer creates and starts new http.TestServer
58func NewTestServer() *TestServer {
59 ts := &TestServer{
60 status: http.StatusOK,
61 header: make(http.Header),
62 data: nil,
63 hook: nil,
64 }
65
66 return ts.start()
67}
68
69// SetStatusCode sets the status code that will be returned by the server
70func (s *TestServer) SetStatusCode(status int) *TestServer {

Callers 1

NewLazySuiteTestServerFunction · 0.70

Calls 1

startMethod · 0.95

Tested by

no test coverage detected