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.
20 lines
342 B
Go
20 lines
342 B
Go
package redis
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
func TestScriptCache(t *testing.T) {
|
|
logx.Disable()
|
|
|
|
cache := GetScriptCache()
|
|
cache.SetSha("foo", "bar")
|
|
cache.SetSha("bla", "blabla")
|
|
bar, ok := cache.GetSha("foo")
|
|
assert.True(t, ok)
|
|
assert.Equal(t, "bar", bar)
|
|
}
|