MCPcopy Create free account
hub / github.com/getkin/kin-openapi / createTestServer

Function createTestServer

openapi3/loader_test.go:270–277  ·  view source on GitHub ↗
(t *testing.T, handler http.Handler)

Source from the content-addressed store, hash-verified

268}
269
270func createTestServer(t *testing.T, handler http.Handler) *httptest.Server {
271 ts := httptest.NewUnstartedServer(handler)
272 l, err := net.Listen("tcp", addr)
273 require.NoError(t, err)
274 ts.Listener.Close()
275 ts.Listener = l
276 return ts
277}
278
279func TestLoadFromRemoteURL(t *testing.T) {
280 fs := http.FileServer(http.Dir("testdata"))

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…