-
Notifications
You must be signed in to change notification settings - Fork 15
/
helper_integ_test.go
43 lines (38 loc) · 954 Bytes
/
helper_integ_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//go:build integration
// +build integration
package tiktok_test
import (
"log"
"os"
"testing"
"github.com/ipfans/tiktok"
)
const (
_AK_KEY = "AK"
_SHOP_KEY = "SHOP"
_ORDER_KEY = "ORDER"
_PAGESIZE = 10
_ShippingProviderID = ""
_TRACKINGNUMBER = ""
_PACKAGEID = ""
_ORDERID = 0
_ORDERIDStr = ""
_FakeOrderID = ""
_PRODUCTID = ""
_SKUID = ""
_WAREHOUSEID = ""
_CATEGORYID = "903560"
_SORT_TYPE = 1 // Available values: 1 (DESC), 2 (ASC) Default value 1
)
func newTestClient(t *testing.T) *tiktok.Client {
t.Helper()
appKey := os.Getenv("APPKEY")
appSecret := os.Getenv("APPSECRET")
ak := os.Getenv("AK")
if tiktok.CheckEmpty(appKey, appSecret, ak) {
t.Skip("APPKEY, APPSECRET or AK is empty")
}
logger := log.Default()
c, _ := tiktok.New(appKey, appSecret, tiktok.WithLogger(logger))
return c
}