Files
open-im-server/pkg/common/db/redisModel_test.go
T

28 lines
567 B
Go
Raw Normal View History

2021-11-30 19:35:55 +08:00
package db
import (
"fmt"
"github.com/stretchr/testify/assert"
"testing"
)
func Test_SetTokenMapByUidPid(t *testing.T) {
m := make(map[string]int, 0)
2021-12-01 12:16:02 +08:00
m["test1"] = 1
m["test2"] = 2
2021-11-30 21:05:24 +08:00
m["2332"] = 4
2021-11-30 19:35:55 +08:00
_ = DB.SetTokenMapByUidPid("1234", 2, m)
}
func Test_GetTokenMapByUidPid(t *testing.T) {
m, err := DB.GetTokenMapByUidPid("1234", "Android")
assert.Nil(t, err)
fmt.Println(m)
}
2021-12-07 11:46:24 +08:00
func TestDataBases_GetMultiConversationMsgOpt(t *testing.T) {
m, err := DB.GetMultiConversationMsgOpt("fg", []string{"user", "age", "color"})
assert.Nil(t, err)
fmt.Println(m)
}