|
@@ -1,7 +1,6 @@
|
|
package online
|
|
package online
|
|
|
|
|
|
import (
|
|
import (
|
|
- "github.com/gogf/gf/database/gredis"
|
|
|
|
"reflect"
|
|
"reflect"
|
|
"testing"
|
|
"testing"
|
|
"time"
|
|
"time"
|
|
@@ -37,11 +36,7 @@ func checkOfflineStatus(t *testing.T, mgr *Manager) {
|
|
}
|
|
}
|
|
|
|
|
|
func TestManager(t *testing.T) {
|
|
func TestManager(t *testing.T) {
|
|
- mgr := NewManager(gredis.Config{
|
|
|
|
- Host: "127.0.0.1",
|
|
|
|
- Port: 6379,
|
|
|
|
- Db: 1,
|
|
|
|
- })
|
|
|
|
|
|
+ mgr := NewManager("127.0.0.1", 6379, 1)
|
|
|
|
|
|
status := Status{
|
|
status := Status{
|
|
ClientIP: "3.3.3.3",
|
|
ClientIP: "3.3.3.3",
|