MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / TestNew_DefaultsToMemory

Function TestNew_DefaultsToMemory

pkg/cache/memory_test.go:97–102  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

95}
96
97func TestNew_DefaultsToMemory(t *testing.T) {
98 c, err := New[string](WithTTL(time.Second))
99 require.NoError(t, err)
100 _, ok := c.(*memoryCache[string])
101 assert.True(t, ok, "expected memoryCache when no NATS connection provided")
102}
103
104func TestNew_RequiresTTL(t *testing.T) {
105 _, err := New[string]()

Callers

nothing calls this directly

Calls 1

WithTTLFunction · 0.85

Tested by

no test coverage detected