| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| apipb "go.chromium.org/luci/swarming/proto/api_v2" |
| |
| grpc "google.golang.org/grpc" |
| |
| mock "github.com/stretchr/testify/mock" |
| ) |
| |
| // SwarmingV2Client is an autogenerated mock type for the SwarmingV2Client type |
| type SwarmingV2Client struct { |
| mock.Mock |
| } |
| |
| // BatchGetResult provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) BatchGetResult(ctx context.Context, in *apipb.BatchGetResultRequest, opts ...grpc.CallOption) (*apipb.BatchGetResultResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for BatchGetResult") |
| } |
| |
| var r0 *apipb.BatchGetResultResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BatchGetResultRequest, ...grpc.CallOption) (*apipb.BatchGetResultResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BatchGetResultRequest, ...grpc.CallOption) *apipb.BatchGetResultResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.BatchGetResultResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.BatchGetResultRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // CancelTask provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) CancelTask(ctx context.Context, in *apipb.TaskCancelRequest, opts ...grpc.CallOption) (*apipb.CancelResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for CancelTask") |
| } |
| |
| var r0 *apipb.CancelResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TaskCancelRequest, ...grpc.CallOption) (*apipb.CancelResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TaskCancelRequest, ...grpc.CallOption) *apipb.CancelResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.CancelResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.TaskCancelRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // CancelTasks provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) CancelTasks(ctx context.Context, in *apipb.TasksCancelRequest, opts ...grpc.CallOption) (*apipb.TasksCancelResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for CancelTasks") |
| } |
| |
| var r0 *apipb.TasksCancelResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TasksCancelRequest, ...grpc.CallOption) (*apipb.TasksCancelResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TasksCancelRequest, ...grpc.CallOption) *apipb.TasksCancelResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.TasksCancelResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.TasksCancelRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // CountBots provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) CountBots(ctx context.Context, in *apipb.BotsCountRequest, opts ...grpc.CallOption) (*apipb.BotsCount, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for CountBots") |
| } |
| |
| var r0 *apipb.BotsCount |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotsCountRequest, ...grpc.CallOption) (*apipb.BotsCount, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotsCountRequest, ...grpc.CallOption) *apipb.BotsCount); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.BotsCount) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.BotsCountRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // CountTasks provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) CountTasks(ctx context.Context, in *apipb.TasksCountRequest, opts ...grpc.CallOption) (*apipb.TasksCount, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for CountTasks") |
| } |
| |
| var r0 *apipb.TasksCount |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TasksCountRequest, ...grpc.CallOption) (*apipb.TasksCount, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TasksCountRequest, ...grpc.CallOption) *apipb.TasksCount); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.TasksCount) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.TasksCountRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // DeleteBot provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) DeleteBot(ctx context.Context, in *apipb.BotRequest, opts ...grpc.CallOption) (*apipb.DeleteResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for DeleteBot") |
| } |
| |
| var r0 *apipb.DeleteResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotRequest, ...grpc.CallOption) (*apipb.DeleteResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotRequest, ...grpc.CallOption) *apipb.DeleteResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.DeleteResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.BotRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetBot provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) GetBot(ctx context.Context, in *apipb.BotRequest, opts ...grpc.CallOption) (*apipb.BotInfo, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetBot") |
| } |
| |
| var r0 *apipb.BotInfo |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotRequest, ...grpc.CallOption) (*apipb.BotInfo, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotRequest, ...grpc.CallOption) *apipb.BotInfo); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.BotInfo) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.BotRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetBotDimensions provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) GetBotDimensions(ctx context.Context, in *apipb.BotsDimensionsRequest, opts ...grpc.CallOption) (*apipb.BotsDimensions, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetBotDimensions") |
| } |
| |
| var r0 *apipb.BotsDimensions |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotsDimensionsRequest, ...grpc.CallOption) (*apipb.BotsDimensions, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotsDimensionsRequest, ...grpc.CallOption) *apipb.BotsDimensions); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.BotsDimensions) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.BotsDimensionsRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetRequest provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) GetRequest(ctx context.Context, in *apipb.TaskIdRequest, opts ...grpc.CallOption) (*apipb.TaskRequestResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetRequest") |
| } |
| |
| var r0 *apipb.TaskRequestResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TaskIdRequest, ...grpc.CallOption) (*apipb.TaskRequestResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TaskIdRequest, ...grpc.CallOption) *apipb.TaskRequestResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.TaskRequestResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.TaskIdRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetResult provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) GetResult(ctx context.Context, in *apipb.TaskIdWithPerfRequest, opts ...grpc.CallOption) (*apipb.TaskResultResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetResult") |
| } |
| |
| var r0 *apipb.TaskResultResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TaskIdWithPerfRequest, ...grpc.CallOption) (*apipb.TaskResultResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TaskIdWithPerfRequest, ...grpc.CallOption) *apipb.TaskResultResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.TaskResultResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.TaskIdWithPerfRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetStdout provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) GetStdout(ctx context.Context, in *apipb.TaskIdWithOffsetRequest, opts ...grpc.CallOption) (*apipb.TaskOutputResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetStdout") |
| } |
| |
| var r0 *apipb.TaskOutputResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TaskIdWithOffsetRequest, ...grpc.CallOption) (*apipb.TaskOutputResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TaskIdWithOffsetRequest, ...grpc.CallOption) *apipb.TaskOutputResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.TaskOutputResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.TaskIdWithOffsetRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // ListBotEvents provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) ListBotEvents(ctx context.Context, in *apipb.BotEventsRequest, opts ...grpc.CallOption) (*apipb.BotEventsResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for ListBotEvents") |
| } |
| |
| var r0 *apipb.BotEventsResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotEventsRequest, ...grpc.CallOption) (*apipb.BotEventsResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotEventsRequest, ...grpc.CallOption) *apipb.BotEventsResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.BotEventsResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.BotEventsRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // ListBotTasks provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) ListBotTasks(ctx context.Context, in *apipb.BotTasksRequest, opts ...grpc.CallOption) (*apipb.TaskListResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for ListBotTasks") |
| } |
| |
| var r0 *apipb.TaskListResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotTasksRequest, ...grpc.CallOption) (*apipb.TaskListResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotTasksRequest, ...grpc.CallOption) *apipb.TaskListResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.TaskListResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.BotTasksRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // ListBots provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) ListBots(ctx context.Context, in *apipb.BotsRequest, opts ...grpc.CallOption) (*apipb.BotInfoListResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for ListBots") |
| } |
| |
| var r0 *apipb.BotInfoListResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotsRequest, ...grpc.CallOption) (*apipb.BotInfoListResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.BotsRequest, ...grpc.CallOption) *apipb.BotInfoListResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.BotInfoListResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.BotsRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // ListTaskRequests provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) ListTaskRequests(ctx context.Context, in *apipb.TasksRequest, opts ...grpc.CallOption) (*apipb.TaskRequestsResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for ListTaskRequests") |
| } |
| |
| var r0 *apipb.TaskRequestsResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TasksRequest, ...grpc.CallOption) (*apipb.TaskRequestsResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TasksRequest, ...grpc.CallOption) *apipb.TaskRequestsResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.TaskRequestsResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.TasksRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // ListTaskStates provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) ListTaskStates(ctx context.Context, in *apipb.TaskStatesRequest, opts ...grpc.CallOption) (*apipb.TaskStates, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for ListTaskStates") |
| } |
| |
| var r0 *apipb.TaskStates |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TaskStatesRequest, ...grpc.CallOption) (*apipb.TaskStates, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TaskStatesRequest, ...grpc.CallOption) *apipb.TaskStates); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.TaskStates) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.TaskStatesRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // ListTasks provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) ListTasks(ctx context.Context, in *apipb.TasksWithPerfRequest, opts ...grpc.CallOption) (*apipb.TaskListResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for ListTasks") |
| } |
| |
| var r0 *apipb.TaskListResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TasksWithPerfRequest, ...grpc.CallOption) (*apipb.TaskListResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TasksWithPerfRequest, ...grpc.CallOption) *apipb.TaskListResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.TaskListResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.TasksWithPerfRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // NewTask provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) NewTask(ctx context.Context, in *apipb.NewTaskRequest, opts ...grpc.CallOption) (*apipb.TaskRequestMetadataResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for NewTask") |
| } |
| |
| var r0 *apipb.TaskRequestMetadataResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.NewTaskRequest, ...grpc.CallOption) (*apipb.TaskRequestMetadataResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.NewTaskRequest, ...grpc.CallOption) *apipb.TaskRequestMetadataResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.TaskRequestMetadataResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.NewTaskRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // TerminateBot provides a mock function with given fields: ctx, in, opts |
| func (_m *SwarmingV2Client) TerminateBot(ctx context.Context, in *apipb.TerminateRequest, opts ...grpc.CallOption) (*apipb.TerminateResponse, error) { |
| _va := make([]interface{}, len(opts)) |
| for _i := range opts { |
| _va[_i] = opts[_i] |
| } |
| var _ca []interface{} |
| _ca = append(_ca, ctx, in) |
| _ca = append(_ca, _va...) |
| ret := _m.Called(_ca...) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for TerminateBot") |
| } |
| |
| var r0 *apipb.TerminateResponse |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TerminateRequest, ...grpc.CallOption) (*apipb.TerminateResponse, error)); ok { |
| return rf(ctx, in, opts...) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *apipb.TerminateRequest, ...grpc.CallOption) *apipb.TerminateResponse); ok { |
| r0 = rf(ctx, in, opts...) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*apipb.TerminateResponse) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *apipb.TerminateRequest, ...grpc.CallOption) error); ok { |
| r1 = rf(ctx, in, opts...) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // NewSwarmingV2Client creates a new instance of SwarmingV2Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. |
| // The first argument is typically a *testing.T value. |
| func NewSwarmingV2Client(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *SwarmingV2Client { |
| mock := &SwarmingV2Client{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |