You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/core/stores/redis/scriptcache_test.go

17 lines
283 B
Go

package redis
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestScriptCache(t *testing.T) {
cache := GetScriptCache()
cache.SetSha("foo", "bar")
cache.SetSha("bla", "blabla")
bar, ok := cache.GetSha("foo")
assert.True(t, ok)
assert.Equal(t, "bar", bar)
}