generated from broadinstitute/golang-project-template
/
state.go
207 lines (167 loc) · 4.99 KB
/
state.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
import (
terra "github.com/broadinstitute/thelma/internal/thelma/state/api/terra"
mock "github.com/stretchr/testify/mock"
)
// State is an autogenerated mock type for the State type
type State struct {
mock.Mock
}
type State_Expecter struct {
mock *mock.Mock
}
func (_m *State) EXPECT() *State_Expecter {
return &State_Expecter{mock: &_m.Mock}
}
// Clusters provides a mock function with given fields:
func (_m *State) Clusters() terra.Clusters {
ret := _m.Called()
var r0 terra.Clusters
if rf, ok := ret.Get(0).(func() terra.Clusters); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(terra.Clusters)
}
}
return r0
}
// State_Clusters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clusters'
type State_Clusters_Call struct {
*mock.Call
}
// Clusters is a helper method to define mock.On call
func (_e *State_Expecter) Clusters() *State_Clusters_Call {
return &State_Clusters_Call{Call: _e.mock.On("Clusters")}
}
func (_c *State_Clusters_Call) Run(run func()) *State_Clusters_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *State_Clusters_Call) Return(_a0 terra.Clusters) *State_Clusters_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *State_Clusters_Call) RunAndReturn(run func() terra.Clusters) *State_Clusters_Call {
_c.Call.Return(run)
return _c
}
// Destinations provides a mock function with given fields:
func (_m *State) Destinations() terra.Destinations {
ret := _m.Called()
var r0 terra.Destinations
if rf, ok := ret.Get(0).(func() terra.Destinations); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(terra.Destinations)
}
}
return r0
}
// State_Destinations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Destinations'
type State_Destinations_Call struct {
*mock.Call
}
// Destinations is a helper method to define mock.On call
func (_e *State_Expecter) Destinations() *State_Destinations_Call {
return &State_Destinations_Call{Call: _e.mock.On("Destinations")}
}
func (_c *State_Destinations_Call) Run(run func()) *State_Destinations_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *State_Destinations_Call) Return(_a0 terra.Destinations) *State_Destinations_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *State_Destinations_Call) RunAndReturn(run func() terra.Destinations) *State_Destinations_Call {
_c.Call.Return(run)
return _c
}
// Environments provides a mock function with given fields:
func (_m *State) Environments() terra.Environments {
ret := _m.Called()
var r0 terra.Environments
if rf, ok := ret.Get(0).(func() terra.Environments); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(terra.Environments)
}
}
return r0
}
// State_Environments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Environments'
type State_Environments_Call struct {
*mock.Call
}
// Environments is a helper method to define mock.On call
func (_e *State_Expecter) Environments() *State_Environments_Call {
return &State_Environments_Call{Call: _e.mock.On("Environments")}
}
func (_c *State_Environments_Call) Run(run func()) *State_Environments_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *State_Environments_Call) Return(_a0 terra.Environments) *State_Environments_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *State_Environments_Call) RunAndReturn(run func() terra.Environments) *State_Environments_Call {
_c.Call.Return(run)
return _c
}
// Releases provides a mock function with given fields:
func (_m *State) Releases() terra.Releases {
ret := _m.Called()
var r0 terra.Releases
if rf, ok := ret.Get(0).(func() terra.Releases); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(terra.Releases)
}
}
return r0
}
// State_Releases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Releases'
type State_Releases_Call struct {
*mock.Call
}
// Releases is a helper method to define mock.On call
func (_e *State_Expecter) Releases() *State_Releases_Call {
return &State_Releases_Call{Call: _e.mock.On("Releases")}
}
func (_c *State_Releases_Call) Run(run func()) *State_Releases_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *State_Releases_Call) Return(_a0 terra.Releases) *State_Releases_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *State_Releases_Call) RunAndReturn(run func() terra.Releases) *State_Releases_Call {
_c.Call.Return(run)
return _c
}
// NewState creates a new instance of State. 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 NewState(t interface {
mock.TestingT
Cleanup(func())
}) *State {
mock := &State{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}