diff --git a/platformapi/ebaiapi/order_test.go b/platformapi/ebaiapi/order_test.go index 76a10e1d..d97c1b1a 100644 --- a/platformapi/ebaiapi/order_test.go +++ b/platformapi/ebaiapi/order_test.go @@ -7,7 +7,7 @@ import ( ) func TestOrderGet(t *testing.T) { - result, err := api.OrderGet("15381031350154") + result, err := api.OrderGet("1555731848221773250") if err != nil { t.Fatal(err) } else { @@ -23,7 +23,14 @@ func TestOrderCallDelivery(t *testing.T) { } func TestOrderSendOut(t *testing.T) { - err := api.OrderSendOut("15381031350154", "") + err := api.OrderSendOut("1555731848221773250", "") + if err != nil { + t.Fatal(err) + } +} + +func TestOrderComplete(t *testing.T) { + err := api.OrderComplete("1555731848221773250", "") if err != nil { t.Fatal(err) } diff --git a/platformapi/xiaowmapi/xiaowmapi_test.go b/platformapi/xiaowmapi/xiaowmapi_test.go index 6290af28..f8ca1a70 100644 --- a/platformapi/xiaowmapi/xiaowmapi_test.go +++ b/platformapi/xiaowmapi/xiaowmapi_test.go @@ -22,7 +22,7 @@ func init() { } func TestPrinterAuth(t *testing.T) { - result, err := api.AuthPrinter("7JizmSyiXNzkggaqU", "", "") + result, err := api.AuthPrinter("notexist", "", "") if err != nil { t.Fatalf("PrinterAuth return error:%v", err) } @@ -45,7 +45,7 @@ func TestSendMsg(t *testing.T) { } func TestGetPrinterStatus(t *testing.T) { - runningStae, paperState, err := api.GetPrinterStatus("7JizmSyiXNzkggaqU", "177f213277dd842ba2b53f6c926a48ea") + runningStae, paperState, err := api.GetPrinterStatus("notexist", "fc613a8811f963debca940c76b75d162") if err != nil { t.Fatalf("GetPrinterStatus return error:%v", err) } diff --git a/platformapi/zhongwuapi/zhongwuapi_test.go b/platformapi/zhongwuapi/zhongwuapi_test.go index 87d2fee3..1ef0f2a9 100644 --- a/platformapi/zhongwuapi/zhongwuapi_test.go +++ b/platformapi/zhongwuapi/zhongwuapi_test.go @@ -33,3 +33,9 @@ func TestPrintMsg(t *testing.T) { handleError(t, err) baseapi.SugarLogger.Debug(id, status) } + +func TestGetPrinterStatus(t *testing.T) { + status, err := api.GetPrinterStatus("deviceid", "devicesecret") + handleError(t, err) + baseapi.SugarLogger.Debug(status) +}