MCPcopy
hub / github.com/willnorris/imageproxy / TestNopCache

Function TestNopCache

cache_test.go:8–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6import "testing"
7
8func TestNopCache(t *testing.T) {
9 data, ok := NopCache.Get("foo")
10 if data != nil {
11 t.Errorf("NopCache.Get returned non-nil data")
12 }
13 if ok != false {
14 t.Errorf("NopCache.Get returned ok = true, should always be false.")
15 }
16
17 // nothing to test on these methods other than to verify they exist
18 NopCache.Set("", []byte{})
19 NopCache.Delete("")
20}

Callers

nothing calls this directly

Calls 3

GetMethod · 0.65
SetMethod · 0.65
DeleteMethod · 0.65

Tested by

no test coverage detected