github.com/lovung/GoCleanArchitecture@v0.0.0-20210302152432-50d91fd29f9f/pkg/storage/storage_cache_test.go (about) 1 package storage 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 ) 8 9 func TestInitCache(t *testing.T) { 10 t.Parallel() 11 t.Run("Test in memory cache", func(t *testing.T) { 12 InitCache() 13 GetCache().Set("A", 1) 14 a := GetCache().Get("A") 15 assert.Equal(t, a, 1) 16 }) 17 }