|
|
@ -15,9 +15,11 @@ import ( |
|
|
"github.com/dtm-labs/dtm/dtmcli/dtmimp" |
|
|
"github.com/dtm-labs/dtm/dtmcli/dtmimp" |
|
|
"github.com/dtm-labs/dtm/dtmcli/logger" |
|
|
"github.com/dtm-labs/dtm/dtmcli/logger" |
|
|
"github.com/dtm-labs/dtm/dtmgrpc" |
|
|
"github.com/dtm-labs/dtm/dtmgrpc" |
|
|
|
|
|
"github.com/dtm-labs/dtm/dtmgrpc/workflow" |
|
|
"github.com/dtm-labs/dtm/dtmsvr" |
|
|
"github.com/dtm-labs/dtm/dtmsvr" |
|
|
"github.com/dtm-labs/dtm/dtmsvr/config" |
|
|
"github.com/dtm-labs/dtm/dtmsvr/config" |
|
|
"github.com/dtm-labs/dtm/dtmsvr/storage/registry" |
|
|
"github.com/dtm-labs/dtm/dtmsvr/storage/registry" |
|
|
|
|
|
"github.com/dtm-labs/dtm/dtmutil" |
|
|
"github.com/dtm-labs/dtm/test/busi" |
|
|
"github.com/dtm-labs/dtm/test/busi" |
|
|
"github.com/go-resty/resty/v2" |
|
|
"github.com/go-resty/resty/v2" |
|
|
) |
|
|
) |
|
|
@ -69,9 +71,13 @@ func TestMain(m *testing.M) { |
|
|
go dtmsvr.StartSvr() |
|
|
go dtmsvr.StartSvr() |
|
|
|
|
|
|
|
|
busi.PopulateDB(false) |
|
|
busi.PopulateDB(false) |
|
|
_ = busi.Startup() |
|
|
hsvr, gsvr := busi.Startup() |
|
|
r := m.Run() |
|
|
// WorkflowStarup 1
|
|
|
exitIf(r) |
|
|
workflow.InitHTTP(dtmutil.DefaultHTTPServer, Busi+"/workflow/resume") |
|
|
|
|
|
workflow.InitGrpc(dtmutil.DefaultGrpcServer, busi.BusiGrpc, gsvr) |
|
|
|
|
|
go busi.RunHTTP(hsvr) |
|
|
|
|
|
go busi.RunGrpc(gsvr) |
|
|
|
|
|
|
|
|
close(dtmsvr.TransProcessedTestChan) |
|
|
close(dtmsvr.TransProcessedTestChan) |
|
|
gid, more := <-dtmsvr.TransProcessedTestChan |
|
|
gid, more := <-dtmsvr.TransProcessedTestChan |
|
|
logger.FatalfIf(more, "extra gid: %s in test chan", gid) |
|
|
logger.FatalfIf(more, "extra gid: %s in test chan", gid) |
|
|
|