common/pkg/coach-client/ca_test.go

31 lines
602 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)
inv, err := client.RequestProductDetail(ctx, "CP150-LHBLK")
if err != nil {
t.Fatal(err)
}
t.Log(inv)
}