(t *testing.T)
| 46 | } |
| 47 | |
| 48 | func TestSet(t *testing.T) { |
| 49 | config.ConfigStore.Store(newTestRedisConfig(t)) |
| 50 | ctx := context.Background() |
| 51 | mockCache, err := NewCache() |
| 52 | assert.NoError(t, err) |
| 53 | |
| 54 | key := "testKey" |
| 55 | value := "testValue" |
| 56 | |
| 57 | // Test setting a value |
| 58 | err = mockCache.Set(ctx, key, value, 10*time.Minute) |
| 59 | assert.NoError(t, err) |
| 60 | |
| 61 | // Test setting a value with zero TTL (should fail or behave differently) |
| 62 | err = mockCache.Set(ctx, key, value, 0) |
| 63 | assert.NoError(t, err) |
| 64 | } |
| 65 | |
| 66 | func TestGet(t *testing.T) { |
| 67 | config.ConfigStore.Store(newTestRedisConfig(t)) |
nothing calls this directly
no test coverage detected