- 修复之前将老平台同步逻辑注释掉引入的BUG
This commit is contained in:
@@ -2,38 +2,36 @@ package ebai
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
)
|
||||
|
||||
func TestSyncStoresSkus(t *testing.T) {
|
||||
skus := make([]int, 100)
|
||||
for i := 0; i < 100; i++ {
|
||||
skus[i] = i + 1
|
||||
}
|
||||
_, err := CurPurchaseHandler.SyncStoreSkus(jxcontext.AdminCtx, nil, testShopID, skus, false, false)
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
}
|
||||
time.Sleep(4 * time.Second)
|
||||
}
|
||||
// func TestSyncStoresSkus(t *testing.T) {
|
||||
// skus := make([]int, 100)
|
||||
// for i := 0; i < 100; i++ {
|
||||
// skus[i] = i + 1
|
||||
// }
|
||||
// _, err := CurPurchaseHandler.SyncStoreSkus(jxcontext.AdminCtx, nil, testShopID, skus, false, false)
|
||||
// if err != nil {
|
||||
// t.Fatal(err.Error())
|
||||
// }
|
||||
// time.Sleep(4 * time.Second)
|
||||
// }
|
||||
|
||||
func TestSyncOneStoreCategoriesFromRemote2Local(t *testing.T) {
|
||||
db := dao.GetDB()
|
||||
err := CurPurchaseHandler.SyncLocalStoreCategory(db, testShopID, "autotest")
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
}
|
||||
}
|
||||
// func TestSyncOneStoreCategoriesFromRemote2Local(t *testing.T) {
|
||||
// db := dao.GetDB()
|
||||
// err := CurPurchaseHandler.SyncLocalStoreCategory(db, testShopID, "autotest")
|
||||
// if err != nil {
|
||||
// t.Fatal(err.Error())
|
||||
// }
|
||||
// }
|
||||
|
||||
func TestSyncOneStoreCategoriesFromLocal2Remote(t *testing.T) {
|
||||
_, err := CurPurchaseHandler.SyncStoreCategory(jxcontext.AdminCtx, nil, testShopID, false)
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
}
|
||||
}
|
||||
// func TestSyncOneStoreCategoriesFromLocal2Remote(t *testing.T) {
|
||||
// _, err := CurPurchaseHandler.SyncStoreCategory(jxcontext.AdminCtx, nil, testShopID, false)
|
||||
// if err != nil {
|
||||
// t.Fatal(err.Error())
|
||||
// }
|
||||
// }
|
||||
|
||||
func TestGetAllRemoteSkus(t *testing.T) {
|
||||
result, err := CurPurchaseHandler.GetStoreSkusFullInfo(jxcontext.AdminCtx, nil, testShopID, testShopBaiduID, nil)
|
||||
|
||||
Reference in New Issue
Block a user