|
@@ -18,18 +18,18 @@ var tableModelDescribe = client.TableModelDescribe{
|
|
}
|
|
}
|
|
|
|
|
|
func TestAutoMigrate(t *testing.T) {
|
|
func TestAutoMigrate(t *testing.T) {
|
|
- initClient(t, "localhost:30170")
|
|
+ initClient(t, "localhost:30170", "2b78141779ee432295ca371b91c5cac7")
|
|
- defer destroyClient(t)
|
|
+ defer destroyClient(t, "2b78141779ee432295ca371b91c5cac7")
|
|
|
|
|
|
newToolKit(t).
|
|
newToolKit(t).
|
|
- autoMigrate("2b78141779ee432295ca371b91c5cac7", &client.AutoMigrateRequest{
|
|
+ autoMigrate(&client.AutoMigrateRequest{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
TablePrefixWithSchema: "test." + simpleUUID()[0:8],
|
|
TablePrefixWithSchema: "test." + simpleUUID()[0:8],
|
|
Version: "v1",
|
|
Version: "v1",
|
|
TableModelDescribe: tableModelDescribe,
|
|
TableModelDescribe: tableModelDescribe,
|
|
},
|
|
},
|
|
}).
|
|
}).
|
|
- autoMigrateBatch("2b78141779ee432295ca371b91c5cac7", &client.AutoMigrateBatchRequest{
|
|
+ autoMigrateBatch(&client.AutoMigrateBatchRequest{
|
|
Items: []client.AutoMigrateItem{
|
|
Items: []client.AutoMigrateItem{
|
|
{
|
|
{
|
|
TablePrefixWithSchema: "test." + simpleUUID()[0:8],
|
|
TablePrefixWithSchema: "test." + simpleUUID()[0:8],
|
|
@@ -46,8 +46,8 @@ func TestAutoMigrate(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
func TestTransaction(t *testing.T) {
|
|
func TestTransaction(t *testing.T) {
|
|
- initClient(t, "localhost:30170")
|
|
+ initClient(t, "localhost:30170", "2b78141779ee432295ca371b91c5cac7")
|
|
- defer destroyClient(t)
|
|
+ defer destroyClient(t, "2b78141779ee432295ca371b91c5cac7")
|
|
|
|
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
|
|
|
|
@@ -63,15 +63,15 @@ func TestTransaction(t *testing.T) {
|
|
resultMap := make(map[string]any)
|
|
resultMap := make(map[string]any)
|
|
|
|
|
|
newToolKit(t).
|
|
newToolKit(t).
|
|
- autoMigrate("2b78141779ee432295ca371b91c5cac7", &client.AutoMigrateRequest{
|
|
+ autoMigrate(&client.AutoMigrateRequest{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
TableModelDescribe: tableModelDescribe,
|
|
TableModelDescribe: tableModelDescribe,
|
|
},
|
|
},
|
|
}).
|
|
}).
|
|
- transaction("2b78141779ee432295ca371b91c5cac7", func(tx client.Transaction) error {
|
|
+ transaction(func(tx client.Transaction) error {
|
|
- statement, err := tx.InsertTx("2b78141779ee432295ca371b91c5cac7", &client.InsertRequest{
|
|
+ statement, err := tx.InsertTx(&client.InsertRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyColumns: []string{"id"},
|
|
KeyColumns: []string{"id"},
|
|
@@ -96,7 +96,7 @@ func TestTransaction(t *testing.T) {
|
|
|
|
|
|
return nil
|
|
return nil
|
|
}).
|
|
}).
|
|
- queryByKeys("2b78141779ee432295ca371b91c5cac7", &client.QueryByKeysRequest{
|
|
+ queryByKeys(&client.QueryByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
@@ -105,8 +105,8 @@ func TestTransaction(t *testing.T) {
|
|
assertEqual(name, resultMap["name"], "名称不一致").
|
|
assertEqual(name, resultMap["name"], "名称不一致").
|
|
assertEqual(now.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
|
|
assertEqual(now.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
|
|
assertEqual(tableNum, resultMap["table_num"], "表数量不一致").
|
|
assertEqual(tableNum, resultMap["table_num"], "表数量不一致").
|
|
- transaction("2b78141779ee432295ca371b91c5cac7", func(tx client.Transaction) error {
|
|
+ transaction(func(tx client.Transaction) error {
|
|
- statement, err := tx.UpdateTx("2b78141779ee432295ca371b91c5cac7", &client.UpdateRequest{
|
|
+ statement, err := tx.UpdateTx(&client.UpdateRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
@@ -131,7 +131,7 @@ func TestTransaction(t *testing.T) {
|
|
|
|
|
|
return nil
|
|
return nil
|
|
}).
|
|
}).
|
|
- queryByKeys("2b78141779ee432295ca371b91c5cac7", &client.QueryByKeysRequest{
|
|
+ queryByKeys(&client.QueryByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
@@ -140,8 +140,8 @@ func TestTransaction(t *testing.T) {
|
|
assertEqual(newName, resultMap["name"], "名称不一致").
|
|
assertEqual(newName, resultMap["name"], "名称不一致").
|
|
assertEqual(newNow.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
|
|
assertEqual(newNow.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
|
|
assertEqual(newTableNum, resultMap["table_num"], "表数量不一致").
|
|
assertEqual(newTableNum, resultMap["table_num"], "表数量不一致").
|
|
- transaction("2b78141779ee432295ca371b91c5cac7", func(tx client.Transaction) error {
|
|
+ transaction(func(tx client.Transaction) error {
|
|
- statement, err := tx.UpdateTx("2b78141779ee432295ca371b91c5cac7", &client.UpdateRequest{
|
|
+ statement, err := tx.UpdateTx(&client.UpdateRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
@@ -159,7 +159,7 @@ func TestTransaction(t *testing.T) {
|
|
|
|
|
|
fmt.Println(statement)
|
|
fmt.Println(statement)
|
|
|
|
|
|
- statement, err = tx.DeleteTx("2b78141779ee432295ca371b91c5cac7", &client.DeleteRequest{
|
|
+ statement, err = tx.DeleteTx(&client.DeleteRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
@@ -178,7 +178,7 @@ func TestTransaction(t *testing.T) {
|
|
|
|
|
|
return nil
|
|
return nil
|
|
}).
|
|
}).
|
|
- countWhere("2b78141779ee432295ca371b91c5cac7", &client.CountWhereRequest{
|
|
+ countWhere(&client.CountWhereRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
Where: []client.ColumnCompare{
|
|
Where: []client.ColumnCompare{
|
|
@@ -193,8 +193,8 @@ func TestTransaction(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
func TestTransactionBatch(t *testing.T) {
|
|
func TestTransactionBatch(t *testing.T) {
|
|
- initClient(t, "localhost:30170")
|
|
+ initClient(t, "localhost:30170", "2b78141779ee432295ca371b91c5cac7")
|
|
- defer destroyClient(t)
|
|
+ defer destroyClient(t, "2b78141779ee432295ca371b91c5cac7")
|
|
|
|
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
|
|
|
|
@@ -212,15 +212,15 @@ func TestTransactionBatch(t *testing.T) {
|
|
resultMap := make(map[string]any)
|
|
resultMap := make(map[string]any)
|
|
|
|
|
|
newToolKit(t).
|
|
newToolKit(t).
|
|
- autoMigrate("2b78141779ee432295ca371b91c5cac7", &client.AutoMigrateRequest{
|
|
+ autoMigrate(&client.AutoMigrateRequest{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
TableModelDescribe: tableModelDescribe,
|
|
TableModelDescribe: tableModelDescribe,
|
|
},
|
|
},
|
|
}).
|
|
}).
|
|
- transaction("2b78141779ee432295ca371b91c5cac7", func(tx client.Transaction) error {
|
|
+ transaction(func(tx client.Transaction) error {
|
|
- statement, err := tx.InsertBatchTx("2b78141779ee432295ca371b91c5cac7", &client.InsertBatchRequest{
|
|
+ statement, err := tx.InsertBatchTx(&client.InsertBatchRequest{
|
|
Items: []*client.InsertTableItem{
|
|
Items: []*client.InsertTableItem{
|
|
{
|
|
{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
@@ -262,7 +262,7 @@ func TestTransactionBatch(t *testing.T) {
|
|
|
|
|
|
return nil
|
|
return nil
|
|
}).
|
|
}).
|
|
- queryByKeys("2b78141779ee432295ca371b91c5cac7", &client.QueryByKeysRequest{
|
|
+ queryByKeys(&client.QueryByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id1},
|
|
KeyValues: map[string]string{"id": id1},
|
|
@@ -271,7 +271,7 @@ func TestTransactionBatch(t *testing.T) {
|
|
assertEqual(name1, resultMap["name"], "名称不一致").
|
|
assertEqual(name1, resultMap["name"], "名称不一致").
|
|
assertEqual(now1.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
|
|
assertEqual(now1.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
|
|
assertEqual(tableNum1, resultMap["table_num"], "表数量不一致").
|
|
assertEqual(tableNum1, resultMap["table_num"], "表数量不一致").
|
|
- queryByKeys("2b78141779ee432295ca371b91c5cac7", &client.QueryByKeysRequest{
|
|
+ queryByKeys(&client.QueryByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id2},
|
|
KeyValues: map[string]string{"id": id2},
|
|
@@ -280,8 +280,8 @@ func TestTransactionBatch(t *testing.T) {
|
|
assertEqual(name2, resultMap["name"], "名称不一致").
|
|
assertEqual(name2, resultMap["name"], "名称不一致").
|
|
assertEqual(now2.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
|
|
assertEqual(now2.UnixMilli(), resultMap["time"].(time.Time).UnixMilli(), "时间不一致").
|
|
assertEqual(tableNum2, resultMap["table_num"], "表数量不一致").
|
|
assertEqual(tableNum2, resultMap["table_num"], "表数量不一致").
|
|
- transaction("2b78141779ee432295ca371b91c5cac7", func(tx client.Transaction) error {
|
|
+ transaction(func(tx client.Transaction) error {
|
|
- statement, err := tx.DeleteBatchTx("2b78141779ee432295ca371b91c5cac7", &client.DeleteBatchRequest{
|
|
+ statement, err := tx.DeleteBatchTx(&client.DeleteBatchRequest{
|
|
Items: []*client.DeleteTableItem{
|
|
Items: []*client.DeleteTableItem{
|
|
{
|
|
{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
@@ -307,7 +307,7 @@ func TestTransactionBatch(t *testing.T) {
|
|
|
|
|
|
return nil
|
|
return nil
|
|
}).
|
|
}).
|
|
- countWhere("2b78141779ee432295ca371b91c5cac7", &client.CountWhereRequest{
|
|
+ countWhere(&client.CountWhereRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
Where: []client.ColumnCompare{
|
|
Where: []client.ColumnCompare{
|
|
@@ -319,7 +319,7 @@ func TestTransactionBatch(t *testing.T) {
|
|
},
|
|
},
|
|
}, &count).
|
|
}, &count).
|
|
assertEqual(int64(0), count, "数量不一致").
|
|
assertEqual(int64(0), count, "数量不一致").
|
|
- countWhere("2b78141779ee432295ca371b91c5cac7", &client.CountWhereRequest{
|
|
+ countWhere(&client.CountWhereRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
Where: []client.ColumnCompare{
|
|
Where: []client.ColumnCompare{
|
|
@@ -334,8 +334,8 @@ func TestTransactionBatch(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
func TestInsert(t *testing.T) {
|
|
func TestInsert(t *testing.T) {
|
|
- initClient(t, "localhost:30170")
|
|
+ initClient(t, "localhost:30170", "2b78141779ee432295ca371b91c5cac7")
|
|
- defer destroyClient(t)
|
|
+ defer destroyClient(t, "2b78141779ee432295ca371b91c5cac7")
|
|
|
|
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
|
|
|
|
@@ -347,14 +347,14 @@ func TestInsert(t *testing.T) {
|
|
resultMap := make(map[string]any)
|
|
resultMap := make(map[string]any)
|
|
|
|
|
|
newToolKit(t).
|
|
newToolKit(t).
|
|
- autoMigrate("2b78141779ee432295ca371b91c5cac7", &client.AutoMigrateRequest{
|
|
+ autoMigrate(&client.AutoMigrateRequest{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
TableModelDescribe: tableModelDescribe,
|
|
TableModelDescribe: tableModelDescribe,
|
|
},
|
|
},
|
|
}).
|
|
}).
|
|
- insert("2b78141779ee432295ca371b91c5cac7", &client.InsertRequest{
|
|
+ insert(&client.InsertRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyColumns: []string{"id"},
|
|
KeyColumns: []string{"id"},
|
|
@@ -366,7 +366,7 @@ func TestInsert(t *testing.T) {
|
|
},
|
|
},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- queryByKeys("2b78141779ee432295ca371b91c5cac7", &client.QueryByKeysRequest{
|
|
+ queryByKeys(&client.QueryByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
@@ -378,8 +378,8 @@ func TestInsert(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
func TestInsertBatch(t *testing.T) {
|
|
func TestInsertBatch(t *testing.T) {
|
|
- initClient(t, "localhost:30170")
|
|
+ initClient(t, "localhost:30170", "2b78141779ee432295ca371b91c5cac7")
|
|
- defer destroyClient(t)
|
|
+ defer destroyClient(t, "2b78141779ee432295ca371b91c5cac7")
|
|
|
|
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
|
|
|
|
@@ -397,14 +397,14 @@ func TestInsertBatch(t *testing.T) {
|
|
var totalCount int64
|
|
var totalCount int64
|
|
|
|
|
|
newToolKit(t).
|
|
newToolKit(t).
|
|
- autoMigrate("2b78141779ee432295ca371b91c5cac7", &client.AutoMigrateRequest{
|
|
+ autoMigrate(&client.AutoMigrateRequest{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
TableModelDescribe: tableModelDescribe,
|
|
TableModelDescribe: tableModelDescribe,
|
|
},
|
|
},
|
|
}).
|
|
}).
|
|
- insertBatch("2b78141779ee432295ca371b91c5cac7", &client.InsertBatchRequest{
|
|
+ insertBatch(&client.InsertBatchRequest{
|
|
Items: []*client.InsertTableItem{
|
|
Items: []*client.InsertTableItem{
|
|
{
|
|
{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
@@ -433,7 +433,7 @@ func TestInsertBatch(t *testing.T) {
|
|
},
|
|
},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- queryByWhereAndOrderBy("2b78141779ee432295ca371b91c5cac7", &client.QueryByWhereAndOrderByRequest{
|
|
+ queryByWhereAndOrderBy(&client.QueryByWhereAndOrderByRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
Where: []client.ColumnCompare{
|
|
Where: []client.ColumnCompare{
|
|
@@ -449,7 +449,7 @@ func TestInsertBatch(t *testing.T) {
|
|
assertEqual(name1, resultsMap[0]["name"], "名称不一致").
|
|
assertEqual(name1, resultsMap[0]["name"], "名称不一致").
|
|
assertEqual(now1.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
|
|
assertEqual(now1.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
|
|
assertEqual(tableNum1, resultsMap[0]["table_num"], "表数量不一致").
|
|
assertEqual(tableNum1, resultsMap[0]["table_num"], "表数量不一致").
|
|
- commonQuery("2b78141779ee432295ca371b91c5cac7", &client.CommonQueryRequest{
|
|
+ commonQuery(&client.CommonQueryRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
Where: []client.ColumnCompare{
|
|
Where: []client.ColumnCompare{
|
|
@@ -468,8 +468,8 @@ func TestInsertBatch(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
func TestUpdate(t *testing.T) {
|
|
func TestUpdate(t *testing.T) {
|
|
- initClient(t, "localhost:30170")
|
|
+ initClient(t, "localhost:30170", "2b78141779ee432295ca371b91c5cac7")
|
|
- defer destroyClient(t)
|
|
+ defer destroyClient(t, "2b78141779ee432295ca371b91c5cac7")
|
|
|
|
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
|
|
|
|
@@ -484,14 +484,14 @@ func TestUpdate(t *testing.T) {
|
|
resultMap := make(map[string]any)
|
|
resultMap := make(map[string]any)
|
|
|
|
|
|
newToolKit(t).
|
|
newToolKit(t).
|
|
- autoMigrate("2b78141779ee432295ca371b91c5cac7", &client.AutoMigrateRequest{
|
|
+ autoMigrate(&client.AutoMigrateRequest{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
TableModelDescribe: tableModelDescribe,
|
|
TableModelDescribe: tableModelDescribe,
|
|
},
|
|
},
|
|
}).
|
|
}).
|
|
- insert("2b78141779ee432295ca371b91c5cac7", &client.InsertRequest{
|
|
+ insert(&client.InsertRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyColumns: []string{"id"},
|
|
KeyColumns: []string{"id"},
|
|
@@ -503,7 +503,7 @@ func TestUpdate(t *testing.T) {
|
|
},
|
|
},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- update("2b78141779ee432295ca371b91c5cac7", &client.UpdateRequest{
|
|
+ update(&client.UpdateRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
@@ -515,7 +515,7 @@ func TestUpdate(t *testing.T) {
|
|
},
|
|
},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- queryByKeys("2b78141779ee432295ca371b91c5cac7", &client.QueryByKeysRequest{
|
|
+ queryByKeys(&client.QueryByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
@@ -527,8 +527,8 @@ func TestUpdate(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
func TestDelete(t *testing.T) {
|
|
func TestDelete(t *testing.T) {
|
|
- initClient(t, "localhost:30170")
|
|
+ initClient(t, "localhost:30170", "2b78141779ee432295ca371b91c5cac7")
|
|
- defer destroyClient(t)
|
|
+ defer destroyClient(t, "2b78141779ee432295ca371b91c5cac7")
|
|
|
|
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
|
|
|
|
@@ -540,14 +540,14 @@ func TestDelete(t *testing.T) {
|
|
var count int64
|
|
var count int64
|
|
|
|
|
|
newToolKit(t).
|
|
newToolKit(t).
|
|
- autoMigrate("2b78141779ee432295ca371b91c5cac7", &client.AutoMigrateRequest{
|
|
+ autoMigrate(&client.AutoMigrateRequest{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
TableModelDescribe: tableModelDescribe,
|
|
TableModelDescribe: tableModelDescribe,
|
|
},
|
|
},
|
|
}).
|
|
}).
|
|
- insert("2b78141779ee432295ca371b91c5cac7", &client.InsertRequest{
|
|
+ insert(&client.InsertRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyColumns: []string{"id"},
|
|
KeyColumns: []string{"id"},
|
|
@@ -559,13 +559,13 @@ func TestDelete(t *testing.T) {
|
|
},
|
|
},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- delete("2b78141779ee432295ca371b91c5cac7", &client.DeleteRequest{
|
|
+ delete(&client.DeleteRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- countWhere("2b78141779ee432295ca371b91c5cac7", &client.CountWhereRequest{
|
|
+ countWhere(&client.CountWhereRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
Where: []client.ColumnCompare{
|
|
Where: []client.ColumnCompare{
|
|
@@ -580,8 +580,8 @@ func TestDelete(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
func TestDeleteBatch(t *testing.T) {
|
|
func TestDeleteBatch(t *testing.T) {
|
|
- initClient(t, "localhost:30170")
|
|
+ initClient(t, "localhost:30170", "2b78141779ee432295ca371b91c5cac7")
|
|
- defer destroyClient(t)
|
|
+ defer destroyClient(t, "2b78141779ee432295ca371b91c5cac7")
|
|
|
|
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
|
|
|
|
@@ -598,14 +598,14 @@ func TestDeleteBatch(t *testing.T) {
|
|
var count int64
|
|
var count int64
|
|
|
|
|
|
newToolKit(t).
|
|
newToolKit(t).
|
|
- autoMigrate("2b78141779ee432295ca371b91c5cac7", &client.AutoMigrateRequest{
|
|
+ autoMigrate(&client.AutoMigrateRequest{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
TableModelDescribe: tableModelDescribe,
|
|
TableModelDescribe: tableModelDescribe,
|
|
},
|
|
},
|
|
}).
|
|
}).
|
|
- insertBatch("2b78141779ee432295ca371b91c5cac7", &client.InsertBatchRequest{
|
|
+ insertBatch(&client.InsertBatchRequest{
|
|
Items: []*client.InsertTableItem{
|
|
Items: []*client.InsertTableItem{
|
|
{
|
|
{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
@@ -634,7 +634,7 @@ func TestDeleteBatch(t *testing.T) {
|
|
},
|
|
},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- deleteBatch("2b78141779ee432295ca371b91c5cac7", &client.DeleteBatchRequest{
|
|
+ deleteBatch(&client.DeleteBatchRequest{
|
|
Items: []*client.DeleteTableItem{
|
|
Items: []*client.DeleteTableItem{
|
|
{
|
|
{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
@@ -647,7 +647,7 @@ func TestDeleteBatch(t *testing.T) {
|
|
},
|
|
},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- commonCount("2b78141779ee432295ca371b91c5cac7", &client.CommonCountRequest{
|
|
+ commonCount(&client.CommonCountRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
}, &count).
|
|
}, &count).
|
|
@@ -655,8 +655,8 @@ func TestDeleteBatch(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
func TestReply(t *testing.T) {
|
|
func TestReply(t *testing.T) {
|
|
- initClient(t, "localhost:30170")
|
|
+ initClient(t, "localhost:30170", "2b78141779ee432295ca371b91c5cac7")
|
|
- defer destroyClient(t)
|
|
+ defer destroyClient(t, "2b78141779ee432295ca371b91c5cac7")
|
|
|
|
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
|
|
|
|
@@ -668,14 +668,14 @@ func TestReply(t *testing.T) {
|
|
resultMap := make(map[string]any)
|
|
resultMap := make(map[string]any)
|
|
|
|
|
|
newToolKit(t).
|
|
newToolKit(t).
|
|
- autoMigrate("2b78141779ee432295ca371b91c5cac7", &client.AutoMigrateRequest{
|
|
+ autoMigrate(&client.AutoMigrateRequest{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
TableModelDescribe: tableModelDescribe,
|
|
TableModelDescribe: tableModelDescribe,
|
|
},
|
|
},
|
|
}).
|
|
}).
|
|
- insert("2b78141779ee432295ca371b91c5cac7", &client.InsertRequest{
|
|
+ insert(&client.InsertRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyColumns: []string{"id"},
|
|
KeyColumns: []string{"id"},
|
|
@@ -687,13 +687,13 @@ func TestReply(t *testing.T) {
|
|
},
|
|
},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- reply("2b78141779ee432295ca371b91c5cac7", &client.ReplayRequest{
|
|
+ reply(&client.ReplayRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- queryByKeys("2b78141779ee432295ca371b91c5cac7", &client.QueryByKeysRequest{
|
|
+ queryByKeys(&client.QueryByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
@@ -705,8 +705,8 @@ func TestReply(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
func TestEventQuery(t *testing.T) {
|
|
func TestEventQuery(t *testing.T) {
|
|
- initClient(t, "localhost:30170")
|
|
+ initClient(t, "localhost:30170", "2b78141779ee432295ca371b91c5cac7")
|
|
- defer destroyClient(t)
|
|
+ defer destroyClient(t, "2b78141779ee432295ca371b91c5cac7")
|
|
|
|
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
tablePrefix := "test." + simpleUUID()[0:8]
|
|
|
|
|
|
@@ -722,7 +722,7 @@ func TestEventQuery(t *testing.T) {
|
|
eventInfos := make([]client.EventInfo, 0)
|
|
eventInfos := make([]client.EventInfo, 0)
|
|
|
|
|
|
newToolKit(t).
|
|
newToolKit(t).
|
|
- autoMigrate("2b78141779ee432295ca371b91c5cac7", &client.AutoMigrateRequest{
|
|
+ autoMigrate(&client.AutoMigrateRequest{
|
|
|
|
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
AutoMigrateItem: client.AutoMigrateItem{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
@@ -730,7 +730,7 @@ func TestEventQuery(t *testing.T) {
|
|
TableModelDescribe: tableModelDescribe,
|
|
TableModelDescribe: tableModelDescribe,
|
|
},
|
|
},
|
|
}).
|
|
}).
|
|
- insert("2b78141779ee432295ca371b91c5cac7", &client.InsertRequest{
|
|
+ insert(&client.InsertRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyColumns: []string{"id"},
|
|
KeyColumns: []string{"id"},
|
|
@@ -742,7 +742,7 @@ func TestEventQuery(t *testing.T) {
|
|
},
|
|
},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- update("2b78141779ee432295ca371b91c5cac7", &client.UpdateRequest{
|
|
+ update(&client.UpdateRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
@@ -754,12 +754,12 @@ func TestEventQuery(t *testing.T) {
|
|
},
|
|
},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- countEventByKeys("2b78141779ee432295ca371b91c5cac7", &client.CountEventByKeysRequest{
|
|
+ countEventByKeys(&client.CountEventByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
}, &totalCount).
|
|
}, &totalCount).
|
|
assertEqual(2, int(totalCount), "总数不一致").
|
|
assertEqual(2, int(totalCount), "总数不一致").
|
|
- commonCountEvent("2b78141779ee432295ca371b91c5cac7", &client.CommonCountEventRequest{
|
|
+ commonCountEvent(&client.CommonCountEventRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
Version: "v1",
|
|
Version: "v1",
|
|
@@ -769,7 +769,7 @@ func TestEventQuery(t *testing.T) {
|
|
EndCreatedTime: now.Add(time.Second).Format(time.DateTime),
|
|
EndCreatedTime: now.Add(time.Second).Format(time.DateTime),
|
|
}, &totalCount).
|
|
}, &totalCount).
|
|
assertEqual(1, int(totalCount), "总数不一致").
|
|
assertEqual(1, int(totalCount), "总数不一致").
|
|
- commonCountEvent("2b78141779ee432295ca371b91c5cac7", &client.CommonCountEventRequest{
|
|
+ commonCountEvent(&client.CommonCountEventRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
Version: "v1",
|
|
Version: "v1",
|
|
@@ -779,7 +779,7 @@ func TestEventQuery(t *testing.T) {
|
|
EndCreatedTime: now.Add(time.Second).Format(time.DateTime),
|
|
EndCreatedTime: now.Add(time.Second).Format(time.DateTime),
|
|
}, &totalCount).
|
|
}, &totalCount).
|
|
assertEqual(1, int(totalCount), "总数不一致").
|
|
assertEqual(1, int(totalCount), "总数不一致").
|
|
- eventQueryByKeys("2b78141779ee432295ca371b91c5cac7", &client.EventQueryByKeysRequest{
|
|
+ eventQueryByKeys(&client.EventQueryByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
PageNo: 0,
|
|
PageNo: 0,
|
|
@@ -799,7 +799,7 @@ func TestEventQuery(t *testing.T) {
|
|
assertEqual("test", eventInfos[1].CreatorID, "创建者ID不一致").
|
|
assertEqual("test", eventInfos[1].CreatorID, "创建者ID不一致").
|
|
assertNotEmpty(eventInfos[1].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[1].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[1].Value, "值为空不一致").
|
|
assertNotEmpty(eventInfos[1].Value, "值为空不一致").
|
|
- eventQueryByKeys("2b78141779ee432295ca371b91c5cac7", &client.EventQueryByKeysRequest{
|
|
+ eventQueryByKeys(&client.EventQueryByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
PageNo: 1,
|
|
PageNo: 1,
|
|
@@ -813,7 +813,7 @@ func TestEventQuery(t *testing.T) {
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
- commonEventQuery("2b78141779ee432295ca371b91c5cac7", &client.CommonEventQueryRequest{
|
|
+ commonEventQuery(&client.CommonEventQueryRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
Version: "v1",
|
|
Version: "v1",
|
|
@@ -832,7 +832,7 @@ func TestEventQuery(t *testing.T) {
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
- commonEventQuery("2b78141779ee432295ca371b91c5cac7", &client.CommonEventQueryRequest{
|
|
+ commonEventQuery(&client.CommonEventQueryRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
Version: "v1",
|
|
Version: "v1",
|
|
@@ -851,18 +851,18 @@ func TestEventQuery(t *testing.T) {
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
- delete("2b78141779ee432295ca371b91c5cac7", &client.DeleteRequest{
|
|
+ delete(&client.DeleteRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
Version: "v1",
|
|
Version: "v1",
|
|
KeyValues: map[string]string{"id": id},
|
|
KeyValues: map[string]string{"id": id},
|
|
UserID: "test",
|
|
UserID: "test",
|
|
}).
|
|
}).
|
|
- countEventHistoryByKeys("2b78141779ee432295ca371b91c5cac7", &client.CountEventByKeysRequest{
|
|
+ countEventHistoryByKeys(&client.CountEventByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
}, &totalCount).
|
|
}, &totalCount).
|
|
assertEqual(3, int(totalCount), "总数不一致").
|
|
assertEqual(3, int(totalCount), "总数不一致").
|
|
- commonCountEventHistory("2b78141779ee432295ca371b91c5cac7", &client.CommonCountEventRequest{
|
|
+ commonCountEventHistory(&client.CommonCountEventRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
Version: "v1",
|
|
Version: "v1",
|
|
@@ -872,7 +872,7 @@ func TestEventQuery(t *testing.T) {
|
|
EndCreatedTime: now.Add(time.Second).Format(time.DateTime),
|
|
EndCreatedTime: now.Add(time.Second).Format(time.DateTime),
|
|
}, &totalCount).
|
|
}, &totalCount).
|
|
assertEqual(1, int(totalCount), "总数不一致").
|
|
assertEqual(1, int(totalCount), "总数不一致").
|
|
- commonCountEventHistory("2b78141779ee432295ca371b91c5cac7", &client.CommonCountEventRequest{
|
|
+ commonCountEventHistory(&client.CommonCountEventRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
Version: "v1",
|
|
Version: "v1",
|
|
@@ -882,7 +882,7 @@ func TestEventQuery(t *testing.T) {
|
|
EndCreatedTime: now.Add(time.Second).Format(time.DateTime),
|
|
EndCreatedTime: now.Add(time.Second).Format(time.DateTime),
|
|
}, &totalCount).
|
|
}, &totalCount).
|
|
assertEqual(1, int(totalCount), "总数不一致").
|
|
assertEqual(1, int(totalCount), "总数不一致").
|
|
- commonCountEventHistory("2b78141779ee432295ca371b91c5cac7", &client.CommonCountEventRequest{
|
|
+ commonCountEventHistory(&client.CommonCountEventRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
Version: "v1",
|
|
Version: "v1",
|
|
@@ -892,7 +892,7 @@ func TestEventQuery(t *testing.T) {
|
|
EndCreatedTime: now.Add(time.Second).Format(time.DateTime),
|
|
EndCreatedTime: now.Add(time.Second).Format(time.DateTime),
|
|
}, &totalCount).
|
|
}, &totalCount).
|
|
assertEqual(1, int(totalCount), "总数不一致").
|
|
assertEqual(1, int(totalCount), "总数不一致").
|
|
- eventHistoryQueryByKeys("2b78141779ee432295ca371b91c5cac7", &client.EventQueryByKeysRequest{
|
|
+ eventHistoryQueryByKeys(&client.EventQueryByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
PageNo: 0,
|
|
PageNo: 0,
|
|
@@ -918,7 +918,7 @@ func TestEventQuery(t *testing.T) {
|
|
assertEqual("test", eventInfos[2].CreatorID, "创建者ID不一致").
|
|
assertEqual("test", eventInfos[2].CreatorID, "创建者ID不一致").
|
|
assertNotEmpty(eventInfos[2].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[2].CreateTime, "创建事件为空").
|
|
assertEqual("", eventInfos[2].Value, "值为空不一致").
|
|
assertEqual("", eventInfos[2].Value, "值为空不一致").
|
|
- eventHistoryQueryByKeys("2b78141779ee432295ca371b91c5cac7", &client.EventQueryByKeysRequest{
|
|
+ eventHistoryQueryByKeys(&client.EventQueryByKeysRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
PageNo: 1,
|
|
PageNo: 1,
|
|
@@ -932,7 +932,7 @@ func TestEventQuery(t *testing.T) {
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
- commonEventHistoryQuery("2b78141779ee432295ca371b91c5cac7", &client.CommonEventQueryRequest{
|
|
+ commonEventHistoryQuery(&client.CommonEventQueryRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
Version: "v1",
|
|
Version: "v1",
|
|
@@ -951,7 +951,7 @@ func TestEventQuery(t *testing.T) {
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
- commonEventHistoryQuery("2b78141779ee432295ca371b91c5cac7", &client.CommonEventQueryRequest{
|
|
+ commonEventHistoryQuery(&client.CommonEventQueryRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
Version: "v1",
|
|
Version: "v1",
|
|
@@ -970,7 +970,7 @@ func TestEventQuery(t *testing.T) {
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
assertNotEmpty(eventInfos[0].Value, "值为空不一致").
|
|
- commonEventHistoryQuery("2b78141779ee432295ca371b91c5cac7", &client.CommonEventQueryRequest{
|
|
+ commonEventHistoryQuery(&client.CommonEventQueryRequest{
|
|
TablePrefixWithSchema: tablePrefix,
|
|
TablePrefixWithSchema: tablePrefix,
|
|
KeyValues: []string{id},
|
|
KeyValues: []string{id},
|
|
Version: "v1",
|
|
Version: "v1",
|