/
runner_service_mock.go
108 lines (88 loc) · 3.12 KB
/
runner_service_mock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// Code generated by mockery v2.36.0. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
app "github.com/inquiryproj/inquiry/internal/app"
)
// Runner is an autogenerated mock type for the Runner type
type Runner struct {
mock.Mock
}
// ListRunsForProject provides a mock function with given fields: ctx, listRunsForProjectRequest
func (_m *Runner) ListRunsForProject(ctx context.Context, listRunsForProjectRequest *app.ListRunsForProjectRequest) (*app.ListRunsForProjectResponse, error) {
ret := _m.Called(ctx, listRunsForProjectRequest)
var r0 *app.ListRunsForProjectResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *app.ListRunsForProjectRequest) (*app.ListRunsForProjectResponse, error)); ok {
return rf(ctx, listRunsForProjectRequest)
}
if rf, ok := ret.Get(0).(func(context.Context, *app.ListRunsForProjectRequest) *app.ListRunsForProjectResponse); ok {
r0 = rf(ctx, listRunsForProjectRequest)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*app.ListRunsForProjectResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *app.ListRunsForProjectRequest) error); ok {
r1 = rf(ctx, listRunsForProjectRequest)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RunProject provides a mock function with given fields: ctx, run
func (_m *Runner) RunProject(ctx context.Context, run *app.RunProjectRequest) (*app.ProjectRunOutput, error) {
ret := _m.Called(ctx, run)
var r0 *app.ProjectRunOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *app.RunProjectRequest) (*app.ProjectRunOutput, error)); ok {
return rf(ctx, run)
}
if rf, ok := ret.Get(0).(func(context.Context, *app.RunProjectRequest) *app.ProjectRunOutput); ok {
r0 = rf(ctx, run)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*app.ProjectRunOutput)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *app.RunProjectRequest) error); ok {
r1 = rf(ctx, run)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RunProjectByName provides a mock function with given fields: ctx, run
func (_m *Runner) RunProjectByName(ctx context.Context, run *app.RunProjectByNameRequest) (*app.ProjectRunOutput, error) {
ret := _m.Called(ctx, run)
var r0 *app.ProjectRunOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *app.RunProjectByNameRequest) (*app.ProjectRunOutput, error)); ok {
return rf(ctx, run)
}
if rf, ok := ret.Get(0).(func(context.Context, *app.RunProjectByNameRequest) *app.ProjectRunOutput); ok {
r0 = rf(ctx, run)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*app.ProjectRunOutput)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *app.RunProjectByNameRequest) error); ok {
r1 = rf(ctx, run)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewRunner creates a new instance of Runner. 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 NewRunner(t interface {
mock.TestingT
Cleanup(func())
}) *Runner {
mock := &Runner{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}