go-common/app/admin/ep/saga/service/pipeline_test.go

44 lines
1.0 KiB
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package service
import (
"context"
"testing"
"go-common/app/admin/ep/saga/model"
"github.com/smartystreets/goconvey/convey"
)
func TestService_QueryProjectRunners(t *testing.T) {
convey.Convey("get saga-admin runners", t, func() {
var (
ctx = context.Background()
req = &model.ProjectDataReq{ProjectID: 682}
)
resp, err := srv.QueryProjectRunners(ctx, req)
convey.So(err, convey.ShouldBeNil)
convey.So(len(resp), convey.ShouldBeGreaterThan, 1)
})
convey.Convey("get saga-admin runners", t, func() {
var (
ctx = context.Background()
req = &model.ProjectDataReq{ProjectID: 4928}
)
resp, err := srv.QueryProjectRunners(ctx, req)
convey.So(err, convey.ShouldBeNil)
convey.So(len(resp), convey.ShouldBeGreaterThan, 1)
})
convey.Convey("get saga-admin runners", t, func() {
var (
ctx = context.Background()
req = &model.ProjectDataReq{ProjectID: 5822}
)
resp, err := srv.QueryProjectRunners(ctx, req)
convey.So(err, convey.ShouldBeNil)
convey.So(len(resp), convey.ShouldBeGreaterThan, 1)
})
}