pipeline_test.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/admin/ep/saga/model"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestService_QueryProjectRunners(t *testing.T) {
  9. convey.Convey("get saga-admin runners", t, func() {
  10. var (
  11. ctx = context.Background()
  12. req = &model.ProjectDataReq{ProjectID: 682}
  13. )
  14. resp, err := srv.QueryProjectRunners(ctx, req)
  15. convey.So(err, convey.ShouldBeNil)
  16. convey.So(len(resp), convey.ShouldBeGreaterThan, 1)
  17. })
  18. convey.Convey("get saga-admin runners", t, func() {
  19. var (
  20. ctx = context.Background()
  21. req = &model.ProjectDataReq{ProjectID: 4928}
  22. )
  23. resp, err := srv.QueryProjectRunners(ctx, req)
  24. convey.So(err, convey.ShouldBeNil)
  25. convey.So(len(resp), convey.ShouldBeGreaterThan, 1)
  26. })
  27. convey.Convey("get saga-admin runners", t, func() {
  28. var (
  29. ctx = context.Background()
  30. req = &model.ProjectDataReq{ProjectID: 5822}
  31. )
  32. resp, err := srv.QueryProjectRunners(ctx, req)
  33. convey.So(err, convey.ShouldBeNil)
  34. convey.So(len(resp), convey.ShouldBeGreaterThan, 1)
  35. })
  36. }