25 lines
589 B
Go
25 lines
589 B
Go
package apitest
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestRedisData(t *testing.T) {
|
|
//InitRedis()
|
|
//uids := []string{"21000505", "21000501", "21000503", "21000507"}
|
|
//results, err := libredis.GetRedisClient().HMGet(context.TODO(), model.RedisHashKeyUserInRoomRole(21000505), uids...).Result()
|
|
//if err != nil && err.Error() != redis.Nil.Error() {
|
|
// t.Log("err=", err)
|
|
//}
|
|
//t.Logf("results:%v", results)
|
|
//if len(results) != len(uids) {
|
|
// t.Log("userBases role error")
|
|
//}
|
|
|
|
}
|
|
|
|
func RedisKeyRoomOnlineUserList(roomId uint32) string {
|
|
return fmt.Sprintf("room:user:%d", roomId)
|
|
}
|