MCPcopy Index your code
hub / github.com/devaccuracy/ledgerforge / TestGetNonExistentKey

Function TestGetNonExistentKey

internal/cache/cache_test.go:90–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

88}
89
90func TestGetNonExistentKey(t *testing.T) {
91 config.ConfigStore.Store(newTestRedisConfig(t))
92 ctx := context.Background()
93 mockCache, err := NewCache()
94 assert.NoError(t, err)
95
96 var getValue map[string]string
97 err = mockCache.Get(ctx, "nonExistentKey", &getValue)
98 assert.NoError(t, err) // Assuming Get returns no error for non-existent keys
99 assert.Empty(t, getValue)
100}
101
102func TestDelete(t *testing.T) {
103 config.ConfigStore.Store(newTestRedisConfig(t))

Callers

nothing calls this directly

Calls 3

GetMethod · 0.95
newTestRedisConfigFunction · 0.85
NewCacheFunction · 0.85

Tested by

no test coverage detected