MCPcopy
hub / github.com/cayleygraph/cayley / makeServerV2

Function makeServerV2

server/http/api_v2_test.go:24–34  ·  view source on GitHub ↗
(t testing.TB, quads ...quad.Quad)

Source from the content-addressed store, hash-verified

22}
23
24func makeServerV2(t testing.TB, quads ...quad.Quad) (string, func()) {
25 h := makeHandle(t, quads...)
26
27 api2 := NewAPIv2(h)
28 srv := httptest.NewServer(api2)
29 addr := srv.Listener.Addr()
30 return "http://" + addr.String(), func() {
31 srv.Close()
32 h.Close()
33 }
34}
35
36func TestV2Write(t *testing.T) {
37 addr, closer := makeServerV2(t)

Callers 2

TestV2WriteFunction · 0.85
TestV2ReadFunction · 0.85

Calls 4

makeHandleFunction · 0.85
NewAPIv2Function · 0.85
StringMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected