mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 17:06:46 +08:00
修复test报错
This commit is contained in:
@@ -3,6 +3,7 @@ package sessdata
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/bjdgyc/anylink/base"
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -24,11 +25,15 @@ func TestConnSession(t *testing.T) {
|
||||
preData(tmp)
|
||||
defer cleardata(tmp)
|
||||
|
||||
time.Sleep(time.Second * 10)
|
||||
|
||||
sess := NewSession("")
|
||||
sess.Username = "user-test"
|
||||
sess.Group = "group1"
|
||||
sess.MacAddr = "00:15:5d:50:14:43"
|
||||
|
||||
cSess := sess.NewConn()
|
||||
base.Info("cSess", cSess)
|
||||
|
||||
err := cSess.RateLimit(100, true)
|
||||
ast.Nil(err)
|
||||
|
Reference in New Issue
Block a user