MCPcopy Index your code
hub / github.com/docker/docker-agent / TestMemoryCache_noTrimByDefault

Function TestMemoryCache_noTrimByDefault

pkg/cache/cache_test.go:67–76  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestMemoryCache_noTrimByDefault(t *testing.T) {
68 t.Parallel()
69 c, err := New(Config{Enabled: true})
70 require.NoError(t, err)
71
72 c.Store(" hello ", "world")
73
74 _, ok := c.Lookup("hello")
75 assert.False(t, ok, "without TrimSpaces, whitespace must be significant")
76}
77
78func TestMemoryCache_overwrite(t *testing.T) {
79 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
StoreMethod · 0.45
LookupMethod · 0.45

Tested by

no test coverage detected