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