You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/common/db/redisModel_test.go

28 lines
567 B

3 years ago
package db
import (
"fmt"
"github.com/stretchr/testify/assert"
"testing"
)
func Test_SetTokenMapByUidPid(t *testing.T) {
m := make(map[string]int, 0)
m["test1"] = 1
m["test2"] = 2
3 years ago
m["2332"] = 4
3 years ago
_ = DB.SetTokenMapByUidPid("1234", 2, m)
}
func Test_GetTokenMapByUidPid(t *testing.T) {
m, err := DB.GetTokenMapByUidPid("1234", "Android")
assert.Nil(t, err)
fmt.Println(m)
}
3 years ago
func TestDataBases_GetMultiConversationMsgOpt(t *testing.T) {
m, err := DB.GetMultiConversationMsgOpt("fg", []string{"user", "age", "color"})
assert.Nil(t, err)
fmt.Println(m)
}