| 12345678910111213141516171819202122232425262728293031 |
- package utils
- //type WhilteListMsg struct {
- // Code string `json:"code"`
- // Message string `json:"msg"`
- // Data []interface{} `json:"data"`
- //}
- //
- //type WhiteListParam struct {
- // HostID string `json:"host_id"`
- // AccountID int32 `json:"account_id"`
- //}
- // func TestGetWhiteList(t *testing.T) {
- //param := WhiteListParam{HostID: "1618154815414545", AccountID: 110}
- //paramByte, err := json.Marshal(param)
- //if err != nil {
- // // log.Errorf("agent[cdc] get runner status error:%s ", err)
- // // continue
- //}
- //resp, err := utils.HTTPConnect("POST", "http://10.0.12.192:18080/api/v1/agent/whitelist", "", paramByte)
- //if err != nil {
- // // log.Errorf("agent[cdc] get runner status error:%s ", err)
- //}
- //result := WhilteListMsg{}
- //err = json.Unmarshal(resp, &result)
- //if err != nil {
- // // log.Errorf("agent[cdc] get runner status error:%s", err)
- //}
- //fmt.Println(result)
- // }
|