|
@@ -1,4 +1,4 @@
|
|
|
-package dspsql
|
|
|
+package test
|
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
@@ -7,6 +7,7 @@ import (
|
|
|
"git.sxidc.com/go-tools/api_binding/http_binding/response"
|
|
|
"git.sxidc.com/service-supports/dps-sdk"
|
|
|
"git.sxidc.com/service-supports/dps-sdk/client"
|
|
|
+ "git.sxidc.com/service-supports/dps-sql/api"
|
|
|
"github.com/go-resty/resty/v2"
|
|
|
"math/rand"
|
|
|
"testing"
|
|
@@ -29,7 +30,7 @@ func TestApiV1OperateParse(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
binding := http_binding.NewBinding("v1")
|
|
|
- ApiV1(binding, dpsAddress, func(c *binding_context.Context) (string, error) {
|
|
|
+ api.ApiV1(binding, dpsAddress, func(c *binding_context.Context) (string, error) {
|
|
|
return operatorID, nil
|
|
|
})
|
|
|
|
|
@@ -213,7 +214,7 @@ func TestApiV1Operate(t *testing.T) {
|
|
|
})
|
|
|
|
|
|
binding := http_binding.NewBinding("v1")
|
|
|
- ApiV1(binding, dpsAddress, func(c *binding_context.Context) (string, error) {
|
|
|
+ api.ApiV1(binding, dpsAddress, func(c *binding_context.Context) (string, error) {
|
|
|
return operatorID, nil
|
|
|
})
|
|
|
|
|
@@ -297,7 +298,7 @@ func operateParse(t *testing.T, sql string) map[string]any {
|
|
|
})
|
|
|
|
|
|
resp, err := resty.New().R().
|
|
|
- SetBody(&OperateParseRequest{
|
|
|
+ SetBody(&api.OperateParseRequest{
|
|
|
SQL: sql,
|
|
|
}).
|
|
|
SetResult(result).
|
|
@@ -324,7 +325,7 @@ func operate(t *testing.T, sql string, keyColumns []string) []map[string]any {
|
|
|
})
|
|
|
|
|
|
resp, err := resty.New().R().
|
|
|
- SetBody(&OperateRequest{
|
|
|
+ SetBody(&api.OperateRequest{
|
|
|
DatabaseID: testDatabaseID,
|
|
|
Version: "v1",
|
|
|
KeyColumns: keyColumns,
|