common/pkg/coach-client/ca_test.go

31 lines
711 B
Go

package coach_client
import (
"context"
"testing"
"time"
"gitea.timerzz.com/kedaya_haitao/common/pkg/proxy"
)
func TestCAClient(t *testing.T) {
subs := []string{"http://116.198.252.167:12580/clash/config"}
pool := proxy.NewProxyPool(&proxy.Option{
Clash: subs,
Interval: 10 * time.Minute,
})
ctx := context.Background()
client := CA(pool).CreateByType(USClient_Type_Coach)
//resp, err := client.ViewAllBags(ctx, 1)
//if err != nil {
// t.Fatal(err)
//}
//t.Log(resp)
resp, err := client.RequestProductDetailList(ctx, "CK535-WEC", "CP081-SVVSW", "C9949-SVVDT", "CM235-SVELC", "CP081-JIBLK", "CAA92-IMCHR", "C9949-SVQVE", "CW637-B4CED")
if err != nil {
t.Fatal(err)
}
t.Log(resp)
}