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

Function TestAPI

src/blobcachecmd/service_test.go:15–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestAPI(t *testing.T) {
16 t.Parallel()
17
18 dir := t.TempDir()
19 execPath := filepath.Join(dir, "blobcache")
20 t.Log("building blobcache command")
21 testutil.BuildGoExec(t, execPath, "../../cmd/blobcache")
22 t.Log("built blobcache command. written to ", execPath)
23
24 blobcachetests.ServiceAPI(t, func(t testing.TB) blobcache.Service {
25 if strings.Contains(t.Name(), "Queue") || strings.Contains(t.Name(), "SubToVol") {
26 // If we ever add `blobcache queue` to the CLI then we can start running these tests.
27 t.SkipNow()
28 }
29 _, apiAddr := blobcached.BGTestDaemon(t)
30 return &blobcachecmd.Service{
31 APIAddr: apiAddr,
32 ExecPath: execPath,
33 }
34 })
35}

Callers

nothing calls this directly

Calls 3

BuildGoExecFunction · 0.92
ServiceAPIFunction · 0.92
BGTestDaemonFunction · 0.92

Tested by

no test coverage detected