MCPcopy Create free account
hub / github.com/blobcache/blobcache / TestService

Function TestService

src/bchttp/bchttp_test.go:14–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestService(t *testing.T) {
15 t.Parallel()
16 blobcachetests.ServiceAPI(t, func(t testing.TB) blobcache.Service {
17 srv := Server{
18 Service: bclocal.NewTestService(t),
19 }
20 lis := testutil.Listen(t)
21 go func() {
22 if err := http.Serve(lis, &srv); err != nil {
23 t.Log(err)
24 }
25 }()
26 return NewClient(nil, fmt.Sprintf("http://%s", lis.Addr().String()))
27 })
28}

Callers

nothing calls this directly

Calls 6

ServiceAPIFunction · 0.92
NewTestServiceFunction · 0.92
ListenFunction · 0.92
NewClientFunction · 0.70
StringMethod · 0.65
ServeMethod · 0.45

Tested by

no test coverage detected