7
0
gaore-common-sdk-go/services/stat/client_test.go

55 lines
1003 B
Go

package stat
import (
"fmt"
"testing"
)
func TestSyncGameServerList(t *testing.T) {
client, err := NewClient()
if err != nil {
panic(err)
}
req := CreateSyncGameServerListReq("insertOrUpdate", []map[string]interface{}{
{
"id": 123564,
"channel_id": 12456,
"version_id": 1,
"game_id": 1,
"server_id": 1,
"game_sign": "test",
"name": "test",
"open_date": "2099-03-01",
"open_time": "12:00:00",
"remark": "",
"status": 1,
"if_tj": 1,
},
})
resp, err := client.SyncGameServerList(req)
if err != nil {
panic(err)
}
fmt.Println(resp.Code, resp.Msg, resp.Count)
}
func TestClient_SetUserNewGameAuth(t *testing.T) {
client, err := NewClient()
if err != nil {
panic(err)
}
req := CreateSetUserNewGameAuthReq(map[string]string{
"game_sign": "qwldy",
"game_id": "7275",
})
resp, err := client.SetUserNewGameAuth(req)
if err != nil {
panic(err)
}
fmt.Println(resp.Code, resp.Msg, resp.Data.Result)
}