mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 18:08:14 -05:00
25 lines
414 B
Go
25 lines
414 B
Go
package iprecoder
|
|
|
|
import (
|
|
"log"
|
|
"testing"
|
|
|
|
"github.com/InazumaV/V2bX/conf"
|
|
"github.com/InazumaV/V2bX/limiter"
|
|
)
|
|
|
|
func TestRedis_SyncOnlineIp(t *testing.T) {
|
|
r := NewRedis(&conf.RedisConfig{
|
|
Address: "127.0.0.1:6379",
|
|
Password: "",
|
|
Db: 0,
|
|
})
|
|
users, err := r.SyncOnlineIp([]limiter.UserIpList{
|
|
{1, []string{"5.5.5.5", "4.4.4.4"}},
|
|
})
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
log.Println(users)
|
|
}
|