package ebai import ( "testing" "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" ) // 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 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) if err != nil { t.Fatal(err.Error()) } else { t.Log(len(result)) } } func TestDeleteRemoteSkus(t *testing.T) { err := CurPurchaseHandler.DeleteStoreAllSkus(jxcontext.AdminCtx, nil, testShopID, testShopBaiduID, true) if err != nil { t.Fatal(err.Error()) } } func TestDeleteRemoteCategories(t *testing.T) { err := new(PurchaseHandler).DeleteStoreAllCategories(jxcontext.AdminCtx, nil, testShopID, testShopBaiduID, true) if err != nil { t.Fatal(err.Error()) } }