test(dao): add set test dao
This commit is contained in:
parent
d6f1631d7b
commit
d963c06576
|
@ -0,0 +1,24 @@
|
|||
package dao
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
_ "gitee.com/timedb/wheatCache/conf"
|
||||
"gitee.com/timedb/wheatCache/pkg/logx"
|
||||
"gitee.com/timedb/wheatCache/pkg/lru"
|
||||
"gitee.com/timedb/wheatCache/pkg/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestDao_Set(t *testing.T) {
|
||||
lruCache := lru.NewLRUCache()
|
||||
dao := NewDao(lruCache)
|
||||
key := &proto.BaseKey{
|
||||
Key: "abc",
|
||||
}
|
||||
|
||||
res, err := dao.Get(key)
|
||||
require.Error(t, err)
|
||||
logx.Infoln(res)
|
||||
|
||||
}
|
Loading…
Reference in New Issue