123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- // Copyright 2019 getensh.com. All rights reserved.
- // Use of this source code is governed by getensh.com.
- package tests
- import (
- v1 "adm-management/pb/v1"
- "context"
- "testing"
- jsoniter "github.com/json-iterator/go"
- )
- var json = jsoniter.ConfigCompatibleWithStandardLibrary
- /*func TestDataSourceRelation(t *testing.T) {
- req := v1.DataSourceRelationRequest{
- SourceCode: "ODS001",
- }
- reply, err := client.DataSourceRelation(context.Background(), &req)
- if err != nil {
- t.Fatal(err)
- } else {
- s, _ := json.MarshalToString(reply)
- t.Log(s)
- }
- }*/
- func TestOfflineTask(t *testing.T) {
- req := v1.CreateRequest{
- Source: "t_adm_ods1",
- TaskName: "ddddd",
- Type: 1,
- Sql: "id<10",
- }
- req.TaskIds = append(req.TaskIds, "dws-task1")
- reply, err := client.Create(context.Background(), &req)
- if err != nil {
- t.Fatal(err)
- } else {
- s, _ := json.MarshalToString(reply)
- t.Log(s)
- }
- }
|