MCPcopy
hub / github.com/perkeep/perkeep / TestMissingGetReturnsNoEnt

Function TestMissingGetReturnsNoEnt

pkg/blobserver/proxycache/proxycache_test.go:104–116  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

102}
103
104func TestMissingGetReturnsNoEnt(t *testing.T) {
105 px, ds := NewProxiedDisk(t)
106 defer cleanUp(ds)
107 foo := &test.Blob{Contents: "foo"}
108
109 blob, _, err := px.Fetch(ctxbg, foo.BlobRef())
110 if err != os.ErrNotExist {
111 t.Errorf("expected ErrNotExist; got %v", err)
112 }
113 if blob != nil {
114 t.Errorf("expected nil blob; got a value")
115 }
116}
117
118func TestProxyCache(t *testing.T) {
119 px, ds := NewProxiedDisk(t)

Callers

nothing calls this directly

Calls 4

BlobRefMethod · 0.95
NewProxiedDiskFunction · 0.85
cleanUpFunction · 0.70
FetchMethod · 0.65

Tested by

no test coverage detected