/
injector_mock.go
252 lines (202 loc) · 6.62 KB
/
injector_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
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
// Code generated by mockery. DO NOT EDIT.
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2024 Datadog, Inc.
package injector
import (
types "github.com/DataDog/chaos-controller/types"
mock "github.com/stretchr/testify/mock"
)
// InjectorMock is an autogenerated mock type for the Injector type
type InjectorMock struct {
mock.Mock
}
type InjectorMock_Expecter struct {
mock *mock.Mock
}
func (_m *InjectorMock) EXPECT() *InjectorMock_Expecter {
return &InjectorMock_Expecter{mock: &_m.Mock}
}
// Clean provides a mock function with given fields:
func (_m *InjectorMock) Clean() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Clean")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// InjectorMock_Clean_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clean'
type InjectorMock_Clean_Call struct {
*mock.Call
}
// Clean is a helper method to define mock.On call
func (_e *InjectorMock_Expecter) Clean() *InjectorMock_Clean_Call {
return &InjectorMock_Clean_Call{Call: _e.mock.On("Clean")}
}
func (_c *InjectorMock_Clean_Call) Run(run func()) *InjectorMock_Clean_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *InjectorMock_Clean_Call) Return(_a0 error) *InjectorMock_Clean_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *InjectorMock_Clean_Call) RunAndReturn(run func() error) *InjectorMock_Clean_Call {
_c.Call.Return(run)
return _c
}
// GetDisruptionKind provides a mock function with given fields:
func (_m *InjectorMock) GetDisruptionKind() types.DisruptionKindName {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetDisruptionKind")
}
var r0 types.DisruptionKindName
if rf, ok := ret.Get(0).(func() types.DisruptionKindName); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(types.DisruptionKindName)
}
return r0
}
// InjectorMock_GetDisruptionKind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDisruptionKind'
type InjectorMock_GetDisruptionKind_Call struct {
*mock.Call
}
// GetDisruptionKind is a helper method to define mock.On call
func (_e *InjectorMock_Expecter) GetDisruptionKind() *InjectorMock_GetDisruptionKind_Call {
return &InjectorMock_GetDisruptionKind_Call{Call: _e.mock.On("GetDisruptionKind")}
}
func (_c *InjectorMock_GetDisruptionKind_Call) Run(run func()) *InjectorMock_GetDisruptionKind_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *InjectorMock_GetDisruptionKind_Call) Return(_a0 types.DisruptionKindName) *InjectorMock_GetDisruptionKind_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *InjectorMock_GetDisruptionKind_Call) RunAndReturn(run func() types.DisruptionKindName) *InjectorMock_GetDisruptionKind_Call {
_c.Call.Return(run)
return _c
}
// Inject provides a mock function with given fields:
func (_m *InjectorMock) Inject() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Inject")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// InjectorMock_Inject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Inject'
type InjectorMock_Inject_Call struct {
*mock.Call
}
// Inject is a helper method to define mock.On call
func (_e *InjectorMock_Expecter) Inject() *InjectorMock_Inject_Call {
return &InjectorMock_Inject_Call{Call: _e.mock.On("Inject")}
}
func (_c *InjectorMock_Inject_Call) Run(run func()) *InjectorMock_Inject_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *InjectorMock_Inject_Call) Return(_a0 error) *InjectorMock_Inject_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *InjectorMock_Inject_Call) RunAndReturn(run func() error) *InjectorMock_Inject_Call {
_c.Call.Return(run)
return _c
}
// TargetName provides a mock function with given fields:
func (_m *InjectorMock) TargetName() string {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for TargetName")
}
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// InjectorMock_TargetName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TargetName'
type InjectorMock_TargetName_Call struct {
*mock.Call
}
// TargetName is a helper method to define mock.On call
func (_e *InjectorMock_Expecter) TargetName() *InjectorMock_TargetName_Call {
return &InjectorMock_TargetName_Call{Call: _e.mock.On("TargetName")}
}
func (_c *InjectorMock_TargetName_Call) Run(run func()) *InjectorMock_TargetName_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *InjectorMock_TargetName_Call) Return(_a0 string) *InjectorMock_TargetName_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *InjectorMock_TargetName_Call) RunAndReturn(run func() string) *InjectorMock_TargetName_Call {
_c.Call.Return(run)
return _c
}
// UpdateConfig provides a mock function with given fields: config
func (_m *InjectorMock) UpdateConfig(config Config) {
_m.Called(config)
}
// InjectorMock_UpdateConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateConfig'
type InjectorMock_UpdateConfig_Call struct {
*mock.Call
}
// UpdateConfig is a helper method to define mock.On call
// - config Config
func (_e *InjectorMock_Expecter) UpdateConfig(config interface{}) *InjectorMock_UpdateConfig_Call {
return &InjectorMock_UpdateConfig_Call{Call: _e.mock.On("UpdateConfig", config)}
}
func (_c *InjectorMock_UpdateConfig_Call) Run(run func(config Config)) *InjectorMock_UpdateConfig_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(Config))
})
return _c
}
func (_c *InjectorMock_UpdateConfig_Call) Return() *InjectorMock_UpdateConfig_Call {
_c.Call.Return()
return _c
}
func (_c *InjectorMock_UpdateConfig_Call) RunAndReturn(run func(Config)) *InjectorMock_UpdateConfig_Call {
_c.Call.Return(run)
return _c
}
// NewInjectorMock creates a new instance of InjectorMock. 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 NewInjectorMock(t interface {
mock.TestingT
Cleanup(func())
}) *InjectorMock {
mock := &InjectorMock{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}