mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
fix report bug
This commit is contained in:
@@ -6,7 +6,9 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestClient_GetNodeInfo(t *testing.T) {
|
||||
var client Panel
|
||||
|
||||
func init() {
|
||||
c, err := New(&conf.ApiConfig{
|
||||
APIHost: "http://127.0.0.1",
|
||||
Key: "token",
|
||||
@@ -14,7 +16,21 @@ func TestClient_GetNodeInfo(t *testing.T) {
|
||||
NodeID: 1,
|
||||
})
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
log.Panic(err)
|
||||
}
|
||||
log.Println(c.GetNodeInfo())
|
||||
client = c
|
||||
}
|
||||
|
||||
func TestClient_GetNodeInfo(t *testing.T) {
|
||||
log.Println(client.GetNodeInfo())
|
||||
}
|
||||
|
||||
func TestClient_ReportUserTraffic(t *testing.T) {
|
||||
log.Println(client.ReportUserTraffic([]UserTraffic{
|
||||
{
|
||||
UID: 10372,
|
||||
Upload: 1000,
|
||||
Download: 1000,
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user