test(cli): generate control plane mock
- commit
- 6e7b92eea21119cf0764f7d72868008c140e9047
- author
- brice · · 2026-05-22 03:44 UTC
- parent
- 0c06e0c
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
7 files · +2808 -54
M .mockery.yaml +1 -0
| @@ -52,3 +52,4 @@ packages: | |||
| 52 | 52 | github.com/bnema/gordon/internal/adapters/in/cli: | |
| 53 | 53 | interfaces: | |
| 54 | 54 | pushImageOps: | |
| 55 | + | ControlPlane: | |
| @@ -52,3 +52,4 @@ packages: | |||||
| 52 | github.com/bnema/gordon/internal/adapters/in/cli: | 52 | github.com/bnema/gordon/internal/adapters/in/cli: | ||
| 53 | interfaces: | 53 | interfaces: | ||
| 54 | pushImageOps: | 54 | pushImageOps: | ||
| 55 | + | ControlPlane: | |||
M internal/adapters/in/cli/attachments_push_test.go +8 -0
| @@ -81,6 +81,14 @@ func (c *attachmentPushTestControlPlane) GetAttachmentsConfig(context.Context, s | |||
| 81 | 81 | panic("unexpected call") | |
| 82 | 82 | } | |
| 83 | 83 | ||
| 84 | + | func (c *attachmentPushTestControlPlane) ListOrphanedAttachments(context.Context) ([]domain.CleanupAttachment, error) { | |
| 85 | + | panic("unexpected call") | |
| 86 | + | } | |
| 87 | + | ||
| 88 | + | func (c *attachmentPushTestControlPlane) CleanupOrphanedAttachments(context.Context, string, bool) (*domain.CleanupReport, error) { | |
| 89 | + | panic("unexpected call") | |
| 90 | + | } | |
| 91 | + | ||
| 84 | 92 | func (c *attachmentPushTestControlPlane) FindAttachmentTargetsByImage(ctx context.Context, imageName string) ([]string, error) { | |
| 85 | 93 | if c.findAttachmentTargets != nil { | |
| 86 | 94 | return c.findAttachmentTargets(ctx, imageName) | |
| @@ -81,6 +81,14 @@ func (c *attachmentPushTestControlPlane) GetAttachmentsConfig(context.Context, s | |||||
| 81 | panic("unexpected call") | 81 | panic("unexpected call") | ||
| 82 | } | 82 | } | ||
| 83 | 83 | ||||
| 84 | + | func (c *attachmentPushTestControlPlane) ListOrphanedAttachments(context.Context) ([]domain.CleanupAttachment, error) { | |||
| 85 | + | panic("unexpected call") | |||
| 86 | + | } | |||
| 87 | + | ||||
| 88 | + | func (c *attachmentPushTestControlPlane) CleanupOrphanedAttachments(context.Context, string, bool) (*domain.CleanupReport, error) { | |||
| 89 | + | panic("unexpected call") | |||
| 90 | + | } | |||
| 91 | + | ||||
| 84 | func (c *attachmentPushTestControlPlane) FindAttachmentTargetsByImage(ctx context.Context, imageName string) ([]string, error) { | 92 | func (c *attachmentPushTestControlPlane) FindAttachmentTargetsByImage(ctx context.Context, imageName string) ([]string, error) { | ||
| 85 | if c.findAttachmentTargets != nil { | 93 | if c.findAttachmentTargets != nil { | ||
| 86 | return c.findAttachmentTargets(ctx, imageName) | 94 | return c.findAttachmentTargets(ctx, imageName) | ||
M internal/adapters/in/cli/controlplane.go +2 -0
| @@ -30,6 +30,8 @@ type ControlPlane interface { | |||
| 30 | 30 | ||
| 31 | 31 | GetAllAttachmentsConfig(ctx context.Context) (map[string][]string, error) | |
| 32 | 32 | GetAttachmentsConfig(ctx context.Context, domainOrGroup string) ([]string, error) | |
| 33 | + | ListOrphanedAttachments(ctx context.Context) ([]domain.CleanupAttachment, error) | |
| 34 | + | CleanupOrphanedAttachments(ctx context.Context, owner string, stop bool) (*domain.CleanupReport, error) | |
| 33 | 35 | FindAttachmentTargetsByImage(ctx context.Context, imageName string) ([]string, error) | |
| 34 | 36 | AddAttachment(ctx context.Context, domainOrGroup, image string) error | |
| 35 | 37 | RemoveAttachment(ctx context.Context, domainOrGroup, image string) error | |
| @@ -30,6 +30,8 @@ type ControlPlane interface { | |||||
| 30 | 30 | ||||
| 31 | GetAllAttachmentsConfig(ctx context.Context) (map[string][]string, error) | 31 | GetAllAttachmentsConfig(ctx context.Context) (map[string][]string, error) | ||
| 32 | GetAttachmentsConfig(ctx context.Context, domainOrGroup string) ([]string, error) | 32 | GetAttachmentsConfig(ctx context.Context, domainOrGroup string) ([]string, error) | ||
| 33 | + | ListOrphanedAttachments(ctx context.Context) ([]domain.CleanupAttachment, error) | |||
| 34 | + | CleanupOrphanedAttachments(ctx context.Context, owner string, stop bool) (*domain.CleanupReport, error) | |||
| 33 | FindAttachmentTargetsByImage(ctx context.Context, imageName string) ([]string, error) | 35 | FindAttachmentTargetsByImage(ctx context.Context, imageName string) ([]string, error) | ||
| 34 | AddAttachment(ctx context.Context, domainOrGroup, image string) error | 36 | AddAttachment(ctx context.Context, domainOrGroup, image string) error | ||
| 35 | RemoveAttachment(ctx context.Context, domainOrGroup, image string) error | 37 | RemoveAttachment(ctx context.Context, domainOrGroup, image string) error | ||
A internal/adapters/in/cli/mocks/mock_control_plane.go +2760 -0
| @@ -0,0 +1,2760 @@ | |||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |
| 2 | + | // github.com/vektra/mockery | |
| 3 | + | // template: testify | |
| 4 | + | ||
| 5 | + | package mocks | |
| 6 | + | ||
| 7 | + | import ( | |
| 8 | + | "context" | |
| 9 | + | ||
| 10 | + | "github.com/bnema/gordon/internal/adapters/dto" | |
| 11 | + | "github.com/bnema/gordon/internal/adapters/in/cli/remote" | |
| 12 | + | "github.com/bnema/gordon/internal/domain" | |
| 13 | + | mock "github.com/stretchr/testify/mock" | |
| 14 | + | ) | |
| 15 | + | ||
| 16 | + | // NewMockControlPlane creates a new instance of MockControlPlane. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 17 | + | // The first argument is typically a *testing.T value. | |
| 18 | + | func NewMockControlPlane(t interface { | |
| 19 | + | mock.TestingT | |
| 20 | + | Cleanup(func()) | |
| 21 | + | }) *MockControlPlane { | |
| 22 | + | mock := &MockControlPlane{} | |
| 23 | + | mock.Mock.Test(t) | |
| 24 | + | ||
| 25 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 26 | + | ||
| 27 | + | return mock | |
| 28 | + | } | |
| 29 | + | ||
| 30 | + | // MockControlPlane is an autogenerated mock type for the ControlPlane type | |
| 31 | + | type MockControlPlane struct { | |
| 32 | + | mock.Mock | |
| 33 | + | } | |
| 34 | + | ||
| 35 | + | type MockControlPlane_Expecter struct { | |
| 36 | + | mock *mock.Mock | |
| 37 | + | } | |
| 38 | + | ||
| 39 | + | func (_m *MockControlPlane) EXPECT() *MockControlPlane_Expecter { | |
| 40 | + | return &MockControlPlane_Expecter{mock: &_m.Mock} | |
| 41 | + | } | |
| 42 | + | ||
| 43 | + | // AddAttachment provides a mock function for the type MockControlPlane | |
| 44 | + | func (_mock *MockControlPlane) AddAttachment(ctx context.Context, domainOrGroup string, image string) error { | |
| 45 | + | ret := _mock.Called(ctx, domainOrGroup, image) | |
| 46 | + | ||
| 47 | + | if len(ret) == 0 { | |
| 48 | + | panic("no return value specified for AddAttachment") | |
| 49 | + | } | |
| 50 | + | ||
| 51 | + | var r0 error | |
| 52 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { | |
| 53 | + | r0 = returnFunc(ctx, domainOrGroup, image) | |
| 54 | + | } else { | |
| 55 | + | r0 = ret.Error(0) | |
| 56 | + | } | |
| 57 | + | return r0 | |
| 58 | + | } | |
| 59 | + | ||
| 60 | + | // MockControlPlane_AddAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAttachment' | |
| 61 | + | type MockControlPlane_AddAttachment_Call struct { | |
| 62 | + | *mock.Call | |
| 63 | + | } | |
| 64 | + | ||
| 65 | + | // AddAttachment is a helper method to define mock.On call | |
| 66 | + | // - ctx context.Context | |
| 67 | + | // - domainOrGroup string | |
| 68 | + | // - image string | |
| 69 | + | func (_e *MockControlPlane_Expecter) AddAttachment(ctx interface{}, domainOrGroup interface{}, image interface{}) *MockControlPlane_AddAttachment_Call { | |
| 70 | + | return &MockControlPlane_AddAttachment_Call{Call: _e.mock.On("AddAttachment", ctx, domainOrGroup, image)} | |
| 71 | + | } | |
| 72 | + | ||
| 73 | + | func (_c *MockControlPlane_AddAttachment_Call) Run(run func(ctx context.Context, domainOrGroup string, image string)) *MockControlPlane_AddAttachment_Call { | |
| 74 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 75 | + | var arg0 context.Context | |
| 76 | + | if args[0] != nil { | |
| 77 | + | arg0 = args[0].(context.Context) | |
| 78 | + | } | |
| 79 | + | var arg1 string | |
| 80 | + | if args[1] != nil { | |
| 81 | + | arg1 = args[1].(string) | |
| 82 | + | } | |
| 83 | + | var arg2 string | |
| 84 | + | if args[2] != nil { | |
| 85 | + | arg2 = args[2].(string) | |
| 86 | + | } | |
| 87 | + | run( | |
| 88 | + | arg0, | |
| 89 | + | arg1, | |
| 90 | + | arg2, | |
| 91 | + | ) | |
| 92 | + | }) | |
| 93 | + | return _c | |
| 94 | + | } | |
| 95 | + | ||
| 96 | + | func (_c *MockControlPlane_AddAttachment_Call) Return(err error) *MockControlPlane_AddAttachment_Call { | |
| 97 | + | _c.Call.Return(err) | |
| 98 | + | return _c | |
| 99 | + | } | |
| 100 | + | ||
| 101 | + | func (_c *MockControlPlane_AddAttachment_Call) RunAndReturn(run func(ctx context.Context, domainOrGroup string, image string) error) *MockControlPlane_AddAttachment_Call { | |
| 102 | + | _c.Call.Return(run) | |
| 103 | + | return _c | |
| 104 | + | } | |
| 105 | + | ||
| 106 | + | // AddAutoRouteAllowedDomain provides a mock function for the type MockControlPlane | |
| 107 | + | func (_mock *MockControlPlane) AddAutoRouteAllowedDomain(ctx context.Context, pattern string) error { | |
| 108 | + | ret := _mock.Called(ctx, pattern) | |
| 109 | + | ||
| 110 | + | if len(ret) == 0 { | |
| 111 | + | panic("no return value specified for AddAutoRouteAllowedDomain") | |
| 112 | + | } | |
| 113 | + | ||
| 114 | + | var r0 error | |
| 115 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 116 | + | r0 = returnFunc(ctx, pattern) | |
| 117 | + | } else { | |
| 118 | + | r0 = ret.Error(0) | |
| 119 | + | } | |
| 120 | + | return r0 | |
| 121 | + | } | |
| 122 | + | ||
| 123 | + | // MockControlPlane_AddAutoRouteAllowedDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAutoRouteAllowedDomain' | |
| 124 | + | type MockControlPlane_AddAutoRouteAllowedDomain_Call struct { | |
| 125 | + | *mock.Call | |
| 126 | + | } | |
| 127 | + | ||
| 128 | + | // AddAutoRouteAllowedDomain is a helper method to define mock.On call | |
| 129 | + | // - ctx context.Context | |
| 130 | + | // - pattern string | |
| 131 | + | func (_e *MockControlPlane_Expecter) AddAutoRouteAllowedDomain(ctx interface{}, pattern interface{}) *MockControlPlane_AddAutoRouteAllowedDomain_Call { | |
| 132 | + | return &MockControlPlane_AddAutoRouteAllowedDomain_Call{Call: _e.mock.On("AddAutoRouteAllowedDomain", ctx, pattern)} | |
| 133 | + | } | |
| 134 | + | ||
| 135 | + | func (_c *MockControlPlane_AddAutoRouteAllowedDomain_Call) Run(run func(ctx context.Context, pattern string)) *MockControlPlane_AddAutoRouteAllowedDomain_Call { | |
| 136 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 137 | + | var arg0 context.Context | |
| 138 | + | if args[0] != nil { | |
| 139 | + | arg0 = args[0].(context.Context) | |
| 140 | + | } | |
| 141 | + | var arg1 string | |
| 142 | + | if args[1] != nil { | |
| 143 | + | arg1 = args[1].(string) | |
| 144 | + | } | |
| 145 | + | run( | |
| 146 | + | arg0, | |
| 147 | + | arg1, | |
| 148 | + | ) | |
| 149 | + | }) | |
| 150 | + | return _c | |
| 151 | + | } | |
| 152 | + | ||
| 153 | + | func (_c *MockControlPlane_AddAutoRouteAllowedDomain_Call) Return(err error) *MockControlPlane_AddAutoRouteAllowedDomain_Call { | |
| 154 | + | _c.Call.Return(err) | |
| 155 | + | return _c | |
| 156 | + | } | |
| 157 | + | ||
| 158 | + | func (_c *MockControlPlane_AddAutoRouteAllowedDomain_Call) RunAndReturn(run func(ctx context.Context, pattern string) error) *MockControlPlane_AddAutoRouteAllowedDomain_Call { | |
| 159 | + | _c.Call.Return(run) | |
| 160 | + | return _c | |
| 161 | + | } | |
| 162 | + | ||
| 163 | + | // AddRoute provides a mock function for the type MockControlPlane | |
| 164 | + | func (_mock *MockControlPlane) AddRoute(ctx context.Context, route domain.Route) error { | |
| 165 | + | ret := _mock.Called(ctx, route) | |
| 166 | + | ||
| 167 | + | if len(ret) == 0 { | |
| 168 | + | panic("no return value specified for AddRoute") | |
| 169 | + | } | |
| 170 | + | ||
| 171 | + | var r0 error | |
| 172 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Route) error); ok { | |
| 173 | + | r0 = returnFunc(ctx, route) | |
| 174 | + | } else { | |
| 175 | + | r0 = ret.Error(0) | |
| 176 | + | } | |
| 177 | + | return r0 | |
| 178 | + | } | |
| 179 | + | ||
| 180 | + | // MockControlPlane_AddRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddRoute' | |
| 181 | + | type MockControlPlane_AddRoute_Call struct { | |
| 182 | + | *mock.Call | |
| 183 | + | } | |
| 184 | + | ||
| 185 | + | // AddRoute is a helper method to define mock.On call | |
| 186 | + | // - ctx context.Context | |
| 187 | + | // - route domain.Route | |
| 188 | + | func (_e *MockControlPlane_Expecter) AddRoute(ctx interface{}, route interface{}) *MockControlPlane_AddRoute_Call { | |
| 189 | + | return &MockControlPlane_AddRoute_Call{Call: _e.mock.On("AddRoute", ctx, route)} | |
| 190 | + | } | |
| 191 | + | ||
| 192 | + | func (_c *MockControlPlane_AddRoute_Call) Run(run func(ctx context.Context, route domain.Route)) *MockControlPlane_AddRoute_Call { | |
| 193 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 194 | + | var arg0 context.Context | |
| 195 | + | if args[0] != nil { | |
| 196 | + | arg0 = args[0].(context.Context) | |
| 197 | + | } | |
| 198 | + | var arg1 domain.Route | |
| 199 | + | if args[1] != nil { | |
| 200 | + | arg1 = args[1].(domain.Route) | |
| 201 | + | } | |
| 202 | + | run( | |
| 203 | + | arg0, | |
| 204 | + | arg1, | |
| 205 | + | ) | |
| 206 | + | }) | |
| 207 | + | return _c | |
| 208 | + | } | |
| 209 | + | ||
| 210 | + | func (_c *MockControlPlane_AddRoute_Call) Return(err error) *MockControlPlane_AddRoute_Call { | |
| 211 | + | _c.Call.Return(err) | |
| 212 | + | return _c | |
| 213 | + | } | |
| 214 | + | ||
| 215 | + | func (_c *MockControlPlane_AddRoute_Call) RunAndReturn(run func(ctx context.Context, route domain.Route) error) *MockControlPlane_AddRoute_Call { | |
| 216 | + | _c.Call.Return(run) | |
| 217 | + | return _c | |
| 218 | + | } | |
| 219 | + | ||
| 220 | + | // BackupStatus provides a mock function for the type MockControlPlane | |
| 221 | + | func (_mock *MockControlPlane) BackupStatus(ctx context.Context) ([]dto.BackupJob, error) { | |
| 222 | + | ret := _mock.Called(ctx) | |
| 223 | + | ||
| 224 | + | if len(ret) == 0 { | |
| 225 | + | panic("no return value specified for BackupStatus") | |
| 226 | + | } | |
| 227 | + | ||
| 228 | + | var r0 []dto.BackupJob | |
| 229 | + | var r1 error | |
| 230 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]dto.BackupJob, error)); ok { | |
| 231 | + | return returnFunc(ctx) | |
| 232 | + | } | |
| 233 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []dto.BackupJob); ok { | |
| 234 | + | r0 = returnFunc(ctx) | |
| 235 | + | } else { | |
| 236 | + | if ret.Get(0) != nil { | |
| 237 | + | r0 = ret.Get(0).([]dto.BackupJob) | |
| 238 | + | } | |
| 239 | + | } | |
| 240 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 241 | + | r1 = returnFunc(ctx) | |
| 242 | + | } else { | |
| 243 | + | r1 = ret.Error(1) | |
| 244 | + | } | |
| 245 | + | return r0, r1 | |
| 246 | + | } | |
| 247 | + | ||
| 248 | + | // MockControlPlane_BackupStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BackupStatus' | |
| 249 | + | type MockControlPlane_BackupStatus_Call struct { | |
| 250 | + | *mock.Call | |
| 251 | + | } | |
| 252 | + | ||
| 253 | + | // BackupStatus is a helper method to define mock.On call | |
| 254 | + | // - ctx context.Context | |
| 255 | + | func (_e *MockControlPlane_Expecter) BackupStatus(ctx interface{}) *MockControlPlane_BackupStatus_Call { | |
| 256 | + | return &MockControlPlane_BackupStatus_Call{Call: _e.mock.On("BackupStatus", ctx)} | |
| 257 | + | } | |
| 258 | + | ||
| 259 | + | func (_c *MockControlPlane_BackupStatus_Call) Run(run func(ctx context.Context)) *MockControlPlane_BackupStatus_Call { | |
| 260 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 261 | + | var arg0 context.Context | |
| 262 | + | if args[0] != nil { | |
| 263 | + | arg0 = args[0].(context.Context) | |
| 264 | + | } | |
| 265 | + | run( | |
| 266 | + | arg0, | |
| 267 | + | ) | |
| 268 | + | }) | |
| 269 | + | return _c | |
| 270 | + | } | |
| 271 | + | ||
| 272 | + | func (_c *MockControlPlane_BackupStatus_Call) Return(backupJobs []dto.BackupJob, err error) *MockControlPlane_BackupStatus_Call { | |
| 273 | + | _c.Call.Return(backupJobs, err) | |
| 274 | + | return _c | |
| 275 | + | } | |
| 276 | + | ||
| 277 | + | func (_c *MockControlPlane_BackupStatus_Call) RunAndReturn(run func(ctx context.Context) ([]dto.BackupJob, error)) *MockControlPlane_BackupStatus_Call { | |
| 278 | + | _c.Call.Return(run) | |
| 279 | + | return _c | |
| 280 | + | } | |
| 281 | + | ||
| 282 | + | // Bootstrap provides a mock function for the type MockControlPlane | |
| 283 | + | func (_mock *MockControlPlane) Bootstrap(ctx context.Context, req dto.BootstrapRequest) (*dto.BootstrapResponse, error) { | |
| 284 | + | ret := _mock.Called(ctx, req) | |
| 285 | + | ||
| 286 | + | if len(ret) == 0 { | |
| 287 | + | panic("no return value specified for Bootstrap") | |
| 288 | + | } | |
| 289 | + | ||
| 290 | + | var r0 *dto.BootstrapResponse | |
| 291 | + | var r1 error | |
| 292 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.BootstrapRequest) (*dto.BootstrapResponse, error)); ok { | |
| 293 | + | return returnFunc(ctx, req) | |
| 294 | + | } | |
| 295 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.BootstrapRequest) *dto.BootstrapResponse); ok { | |
| 296 | + | r0 = returnFunc(ctx, req) | |
| 297 | + | } else { | |
| 298 | + | if ret.Get(0) != nil { | |
| 299 | + | r0 = ret.Get(0).(*dto.BootstrapResponse) | |
| 300 | + | } | |
| 301 | + | } | |
| 302 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, dto.BootstrapRequest) error); ok { | |
| 303 | + | r1 = returnFunc(ctx, req) | |
| 304 | + | } else { | |
| 305 | + | r1 = ret.Error(1) | |
| 306 | + | } | |
| 307 | + | return r0, r1 | |
| 308 | + | } | |
| 309 | + | ||
| 310 | + | // MockControlPlane_Bootstrap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bootstrap' | |
| 311 | + | type MockControlPlane_Bootstrap_Call struct { | |
| 312 | + | *mock.Call | |
| 313 | + | } | |
| 314 | + | ||
| 315 | + | // Bootstrap is a helper method to define mock.On call | |
| 316 | + | // - ctx context.Context | |
| 317 | + | // - req dto.BootstrapRequest | |
| 318 | + | func (_e *MockControlPlane_Expecter) Bootstrap(ctx interface{}, req interface{}) *MockControlPlane_Bootstrap_Call { | |
| 319 | + | return &MockControlPlane_Bootstrap_Call{Call: _e.mock.On("Bootstrap", ctx, req)} | |
| 320 | + | } | |
| 321 | + | ||
| 322 | + | func (_c *MockControlPlane_Bootstrap_Call) Run(run func(ctx context.Context, req dto.BootstrapRequest)) *MockControlPlane_Bootstrap_Call { | |
| 323 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 324 | + | var arg0 context.Context | |
| 325 | + | if args[0] != nil { | |
| 326 | + | arg0 = args[0].(context.Context) | |
| 327 | + | } | |
| 328 | + | var arg1 dto.BootstrapRequest | |
| 329 | + | if args[1] != nil { | |
| 330 | + | arg1 = args[1].(dto.BootstrapRequest) | |
| 331 | + | } | |
| 332 | + | run( | |
| 333 | + | arg0, | |
| 334 | + | arg1, | |
| 335 | + | ) | |
| 336 | + | }) | |
| 337 | + | return _c | |
| 338 | + | } | |
| 339 | + | ||
| 340 | + | func (_c *MockControlPlane_Bootstrap_Call) Return(bootstrapResponse *dto.BootstrapResponse, err error) *MockControlPlane_Bootstrap_Call { | |
| 341 | + | _c.Call.Return(bootstrapResponse, err) | |
| 342 | + | return _c | |
| 343 | + | } | |
| 344 | + | ||
| 345 | + | func (_c *MockControlPlane_Bootstrap_Call) RunAndReturn(run func(ctx context.Context, req dto.BootstrapRequest) (*dto.BootstrapResponse, error)) *MockControlPlane_Bootstrap_Call { | |
| 346 | + | _c.Call.Return(run) | |
| 347 | + | return _c | |
| 348 | + | } | |
| 349 | + | ||
| 350 | + | // CleanupOrphanedAttachments provides a mock function for the type MockControlPlane | |
| 351 | + | func (_mock *MockControlPlane) CleanupOrphanedAttachments(ctx context.Context, owner string, stop bool) (*domain.CleanupReport, error) { | |
| 352 | + | ret := _mock.Called(ctx, owner, stop) | |
| 353 | + | ||
| 354 | + | if len(ret) == 0 { | |
| 355 | + | panic("no return value specified for CleanupOrphanedAttachments") | |
| 356 | + | } | |
| 357 | + | ||
| 358 | + | var r0 *domain.CleanupReport | |
| 359 | + | var r1 error | |
| 360 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) (*domain.CleanupReport, error)); ok { | |
| 361 | + | return returnFunc(ctx, owner, stop) | |
| 362 | + | } | |
| 363 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) *domain.CleanupReport); ok { | |
| 364 | + | r0 = returnFunc(ctx, owner, stop) | |
| 365 | + | } else { | |
| 366 | + | if ret.Get(0) != nil { | |
| 367 | + | r0 = ret.Get(0).(*domain.CleanupReport) | |
| 368 | + | } | |
| 369 | + | } | |
| 370 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { | |
| 371 | + | r1 = returnFunc(ctx, owner, stop) | |
| 372 | + | } else { | |
| 373 | + | r1 = ret.Error(1) | |
| 374 | + | } | |
| 375 | + | return r0, r1 | |
| 376 | + | } | |
| 377 | + | ||
| 378 | + | // MockControlPlane_CleanupOrphanedAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CleanupOrphanedAttachments' | |
| 379 | + | type MockControlPlane_CleanupOrphanedAttachments_Call struct { | |
| 380 | + | *mock.Call | |
| 381 | + | } | |
| 382 | + | ||
| 383 | + | // CleanupOrphanedAttachments is a helper method to define mock.On call | |
| 384 | + | // - ctx context.Context | |
| 385 | + | // - owner string | |
| 386 | + | // - stop bool | |
| 387 | + | func (_e *MockControlPlane_Expecter) CleanupOrphanedAttachments(ctx interface{}, owner interface{}, stop interface{}) *MockControlPlane_CleanupOrphanedAttachments_Call { | |
| 388 | + | return &MockControlPlane_CleanupOrphanedAttachments_Call{Call: _e.mock.On("CleanupOrphanedAttachments", ctx, owner, stop)} | |
| 389 | + | } | |
| 390 | + | ||
| 391 | + | func (_c *MockControlPlane_CleanupOrphanedAttachments_Call) Run(run func(ctx context.Context, owner string, stop bool)) *MockControlPlane_CleanupOrphanedAttachments_Call { | |
| 392 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 393 | + | var arg0 context.Context | |
| 394 | + | if args[0] != nil { | |
| 395 | + | arg0 = args[0].(context.Context) | |
| 396 | + | } | |
| 397 | + | var arg1 string | |
| 398 | + | if args[1] != nil { | |
| 399 | + | arg1 = args[1].(string) | |
| 400 | + | } | |
| 401 | + | var arg2 bool | |
| 402 | + | if args[2] != nil { | |
| 403 | + | arg2 = args[2].(bool) | |
| 404 | + | } | |
| 405 | + | run( | |
| 406 | + | arg0, | |
| 407 | + | arg1, | |
| 408 | + | arg2, | |
| 409 | + | ) | |
| 410 | + | }) | |
| 411 | + | return _c | |
| 412 | + | } | |
| 413 | + | ||
| 414 | + | func (_c *MockControlPlane_CleanupOrphanedAttachments_Call) Return(cleanupReport *domain.CleanupReport, err error) *MockControlPlane_CleanupOrphanedAttachments_Call { | |
| 415 | + | _c.Call.Return(cleanupReport, err) | |
| 416 | + | return _c | |
| 417 | + | } | |
| 418 | + | ||
| 419 | + | func (_c *MockControlPlane_CleanupOrphanedAttachments_Call) RunAndReturn(run func(ctx context.Context, owner string, stop bool) (*domain.CleanupReport, error)) *MockControlPlane_CleanupOrphanedAttachments_Call { | |
| 420 | + | _c.Call.Return(run) | |
| 421 | + | return _c | |
| 422 | + | } | |
| 423 | + | ||
| 424 | + | // DeleteAttachmentSecret provides a mock function for the type MockControlPlane | |
| 425 | + | func (_mock *MockControlPlane) DeleteAttachmentSecret(ctx context.Context, domain1 string, service string, key string) error { | |
| 426 | + | ret := _mock.Called(ctx, domain1, service, key) | |
| 427 | + | ||
| 428 | + | if len(ret) == 0 { | |
| 429 | + | panic("no return value specified for DeleteAttachmentSecret") | |
| 430 | + | } | |
| 431 | + | ||
| 432 | + | var r0 error | |
| 433 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok { | |
| 434 | + | r0 = returnFunc(ctx, domain1, service, key) | |
| 435 | + | } else { | |
| 436 | + | r0 = ret.Error(0) | |
| 437 | + | } | |
| 438 | + | return r0 | |
| 439 | + | } | |
| 440 | + | ||
| 441 | + | // MockControlPlane_DeleteAttachmentSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAttachmentSecret' | |
| 442 | + | type MockControlPlane_DeleteAttachmentSecret_Call struct { | |
| 443 | + | *mock.Call | |
| 444 | + | } | |
| 445 | + | ||
| 446 | + | // DeleteAttachmentSecret is a helper method to define mock.On call | |
| 447 | + | // - ctx context.Context | |
| 448 | + | // - domain1 string | |
| 449 | + | // - service string | |
| 450 | + | // - key string | |
| 451 | + | func (_e *MockControlPlane_Expecter) DeleteAttachmentSecret(ctx interface{}, domain1 interface{}, service interface{}, key interface{}) *MockControlPlane_DeleteAttachmentSecret_Call { | |
| 452 | + | return &MockControlPlane_DeleteAttachmentSecret_Call{Call: _e.mock.On("DeleteAttachmentSecret", ctx, domain1, service, key)} | |
| 453 | + | } | |
| 454 | + | ||
| 455 | + | func (_c *MockControlPlane_DeleteAttachmentSecret_Call) Run(run func(ctx context.Context, domain1 string, service string, key string)) *MockControlPlane_DeleteAttachmentSecret_Call { | |
| 456 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 457 | + | var arg0 context.Context | |
| 458 | + | if args[0] != nil { | |
| 459 | + | arg0 = args[0].(context.Context) | |
| 460 | + | } | |
| 461 | + | var arg1 string | |
| 462 | + | if args[1] != nil { | |
| 463 | + | arg1 = args[1].(string) | |
| 464 | + | } | |
| 465 | + | var arg2 string | |
| 466 | + | if args[2] != nil { | |
| 467 | + | arg2 = args[2].(string) | |
| 468 | + | } | |
| 469 | + | var arg3 string | |
| 470 | + | if args[3] != nil { | |
| 471 | + | arg3 = args[3].(string) | |
| 472 | + | } | |
| 473 | + | run( | |
| 474 | + | arg0, | |
| 475 | + | arg1, | |
| 476 | + | arg2, | |
| 477 | + | arg3, | |
| 478 | + | ) | |
| 479 | + | }) | |
| 480 | + | return _c | |
| 481 | + | } | |
| 482 | + | ||
| 483 | + | func (_c *MockControlPlane_DeleteAttachmentSecret_Call) Return(err error) *MockControlPlane_DeleteAttachmentSecret_Call { | |
| 484 | + | _c.Call.Return(err) | |
| 485 | + | return _c | |
| 486 | + | } | |
| 487 | + | ||
| 488 | + | func (_c *MockControlPlane_DeleteAttachmentSecret_Call) RunAndReturn(run func(ctx context.Context, domain1 string, service string, key string) error) *MockControlPlane_DeleteAttachmentSecret_Call { | |
| 489 | + | _c.Call.Return(run) | |
| 490 | + | return _c | |
| 491 | + | } | |
| 492 | + | ||
| 493 | + | // DeleteSecret provides a mock function for the type MockControlPlane | |
| 494 | + | func (_mock *MockControlPlane) DeleteSecret(ctx context.Context, secretDomain string, key string) error { | |
| 495 | + | ret := _mock.Called(ctx, secretDomain, key) | |
| 496 | + | ||
| 497 | + | if len(ret) == 0 { | |
| 498 | + | panic("no return value specified for DeleteSecret") | |
| 499 | + | } | |
| 500 | + | ||
| 501 | + | var r0 error | |
| 502 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { | |
| 503 | + | r0 = returnFunc(ctx, secretDomain, key) | |
| 504 | + | } else { | |
| 505 | + | r0 = ret.Error(0) | |
| 506 | + | } | |
| 507 | + | return r0 | |
| 508 | + | } | |
| 509 | + | ||
| 510 | + | // MockControlPlane_DeleteSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSecret' | |
| 511 | + | type MockControlPlane_DeleteSecret_Call struct { | |
| 512 | + | *mock.Call | |
| 513 | + | } | |
| 514 | + | ||
| 515 | + | // DeleteSecret is a helper method to define mock.On call | |
| 516 | + | // - ctx context.Context | |
| 517 | + | // - secretDomain string | |
| 518 | + | // - key string | |
| 519 | + | func (_e *MockControlPlane_Expecter) DeleteSecret(ctx interface{}, secretDomain interface{}, key interface{}) *MockControlPlane_DeleteSecret_Call { | |
| 520 | + | return &MockControlPlane_DeleteSecret_Call{Call: _e.mock.On("DeleteSecret", ctx, secretDomain, key)} | |
| 521 | + | } | |
| 522 | + | ||
| 523 | + | func (_c *MockControlPlane_DeleteSecret_Call) Run(run func(ctx context.Context, secretDomain string, key string)) *MockControlPlane_DeleteSecret_Call { | |
| 524 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 525 | + | var arg0 context.Context | |
| 526 | + | if args[0] != nil { | |
| 527 | + | arg0 = args[0].(context.Context) | |
| 528 | + | } | |
| 529 | + | var arg1 string | |
| 530 | + | if args[1] != nil { | |
| 531 | + | arg1 = args[1].(string) | |
| 532 | + | } | |
| 533 | + | var arg2 string | |
| 534 | + | if args[2] != nil { | |
| 535 | + | arg2 = args[2].(string) | |
| 536 | + | } | |
| 537 | + | run( | |
| 538 | + | arg0, | |
| 539 | + | arg1, | |
| 540 | + | arg2, | |
| 541 | + | ) | |
| 542 | + | }) | |
| 543 | + | return _c | |
| 544 | + | } | |
| 545 | + | ||
| 546 | + | func (_c *MockControlPlane_DeleteSecret_Call) Return(err error) *MockControlPlane_DeleteSecret_Call { | |
| 547 | + | _c.Call.Return(err) | |
| 548 | + | return _c | |
| 549 | + | } | |
| 550 | + | ||
| 551 | + | func (_c *MockControlPlane_DeleteSecret_Call) RunAndReturn(run func(ctx context.Context, secretDomain string, key string) error) *MockControlPlane_DeleteSecret_Call { | |
| 552 | + | _c.Call.Return(run) | |
| 553 | + | return _c | |
| 554 | + | } | |
| 555 | + | ||
| 556 | + | // Deploy provides a mock function for the type MockControlPlane | |
| 557 | + | func (_mock *MockControlPlane) Deploy(ctx context.Context, deployDomain string) (*remote.DeployResult, error) { | |
| 558 | + | ret := _mock.Called(ctx, deployDomain) | |
| 559 | + | ||
| 560 | + | if len(ret) == 0 { | |
| 561 | + | panic("no return value specified for Deploy") | |
| 562 | + | } | |
| 563 | + | ||
| 564 | + | var r0 *remote.DeployResult | |
| 565 | + | var r1 error | |
| 566 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*remote.DeployResult, error)); ok { | |
| 567 | + | return returnFunc(ctx, deployDomain) | |
| 568 | + | } | |
| 569 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *remote.DeployResult); ok { | |
| 570 | + | r0 = returnFunc(ctx, deployDomain) | |
| 571 | + | } else { | |
| 572 | + | if ret.Get(0) != nil { | |
| 573 | + | r0 = ret.Get(0).(*remote.DeployResult) | |
| 574 | + | } | |
| 575 | + | } | |
| 576 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 577 | + | r1 = returnFunc(ctx, deployDomain) | |
| 578 | + | } else { | |
| 579 | + | r1 = ret.Error(1) | |
| 580 | + | } | |
| 581 | + | return r0, r1 | |
| 582 | + | } | |
| 583 | + | ||
| 584 | + | // MockControlPlane_Deploy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deploy' | |
| 585 | + | type MockControlPlane_Deploy_Call struct { | |
| 586 | + | *mock.Call | |
| 587 | + | } | |
| 588 | + | ||
| 589 | + | // Deploy is a helper method to define mock.On call | |
| 590 | + | // - ctx context.Context | |
| 591 | + | // - deployDomain string | |
| 592 | + | func (_e *MockControlPlane_Expecter) Deploy(ctx interface{}, deployDomain interface{}) *MockControlPlane_Deploy_Call { | |
| 593 | + | return &MockControlPlane_Deploy_Call{Call: _e.mock.On("Deploy", ctx, deployDomain)} | |
| 594 | + | } | |
| 595 | + | ||
| 596 | + | func (_c *MockControlPlane_Deploy_Call) Run(run func(ctx context.Context, deployDomain string)) *MockControlPlane_Deploy_Call { | |
| 597 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 598 | + | var arg0 context.Context | |
| 599 | + | if args[0] != nil { | |
| 600 | + | arg0 = args[0].(context.Context) | |
| 601 | + | } | |
| 602 | + | var arg1 string | |
| 603 | + | if args[1] != nil { | |
| 604 | + | arg1 = args[1].(string) | |
| 605 | + | } | |
| 606 | + | run( | |
| 607 | + | arg0, | |
| 608 | + | arg1, | |
| 609 | + | ) | |
| 610 | + | }) | |
| 611 | + | return _c | |
| 612 | + | } | |
| 613 | + | ||
| 614 | + | func (_c *MockControlPlane_Deploy_Call) Return(deployResult *remote.DeployResult, err error) *MockControlPlane_Deploy_Call { | |
| 615 | + | _c.Call.Return(deployResult, err) | |
| 616 | + | return _c | |
| 617 | + | } | |
| 618 | + | ||
| 619 | + | func (_c *MockControlPlane_Deploy_Call) RunAndReturn(run func(ctx context.Context, deployDomain string) (*remote.DeployResult, error)) *MockControlPlane_Deploy_Call { | |
| 620 | + | _c.Call.Return(run) | |
| 621 | + | return _c | |
| 622 | + | } | |
| 623 | + | ||
| 624 | + | // DeployIntent provides a mock function for the type MockControlPlane | |
| 625 | + | func (_mock *MockControlPlane) DeployIntent(ctx context.Context, imageName string) error { | |
| 626 | + | ret := _mock.Called(ctx, imageName) | |
| 627 | + | ||
| 628 | + | if len(ret) == 0 { | |
| 629 | + | panic("no return value specified for DeployIntent") | |
| 630 | + | } | |
| 631 | + | ||
| 632 | + | var r0 error | |
| 633 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 634 | + | r0 = returnFunc(ctx, imageName) | |
| 635 | + | } else { | |
| 636 | + | r0 = ret.Error(0) | |
| 637 | + | } | |
| 638 | + | return r0 | |
| 639 | + | } | |
| 640 | + | ||
| 641 | + | // MockControlPlane_DeployIntent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeployIntent' | |
| 642 | + | type MockControlPlane_DeployIntent_Call struct { | |
| 643 | + | *mock.Call | |
| 644 | + | } | |
| 645 | + | ||
| 646 | + | // DeployIntent is a helper method to define mock.On call | |
| 647 | + | // - ctx context.Context | |
| 648 | + | // - imageName string | |
| 649 | + | func (_e *MockControlPlane_Expecter) DeployIntent(ctx interface{}, imageName interface{}) *MockControlPlane_DeployIntent_Call { | |
| 650 | + | return &MockControlPlane_DeployIntent_Call{Call: _e.mock.On("DeployIntent", ctx, imageName)} | |
| 651 | + | } | |
| 652 | + | ||
| 653 | + | func (_c *MockControlPlane_DeployIntent_Call) Run(run func(ctx context.Context, imageName string)) *MockControlPlane_DeployIntent_Call { | |
| 654 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 655 | + | var arg0 context.Context | |
| 656 | + | if args[0] != nil { | |
| 657 | + | arg0 = args[0].(context.Context) | |
| 658 | + | } | |
| 659 | + | var arg1 string | |
| 660 | + | if args[1] != nil { | |
| 661 | + | arg1 = args[1].(string) | |
| 662 | + | } | |
| 663 | + | run( | |
| 664 | + | arg0, | |
| 665 | + | arg1, | |
| 666 | + | ) | |
| 667 | + | }) | |
| 668 | + | return _c | |
| 669 | + | } | |
| 670 | + | ||
| 671 | + | func (_c *MockControlPlane_DeployIntent_Call) Return(err error) *MockControlPlane_DeployIntent_Call { | |
| 672 | + | _c.Call.Return(err) | |
| 673 | + | return _c | |
| 674 | + | } | |
| 675 | + | ||
| 676 | + | func (_c *MockControlPlane_DeployIntent_Call) RunAndReturn(run func(ctx context.Context, imageName string) error) *MockControlPlane_DeployIntent_Call { | |
| 677 | + | _c.Call.Return(run) | |
| 678 | + | return _c | |
| 679 | + | } | |
| 680 | + | ||
| 681 | + | // DetectDatabases provides a mock function for the type MockControlPlane | |
| 682 | + | func (_mock *MockControlPlane) DetectDatabases(ctx context.Context, backupDomain string) ([]dto.DatabaseInfo, error) { | |
| 683 | + | ret := _mock.Called(ctx, backupDomain) | |
| 684 | + | ||
| 685 | + | if len(ret) == 0 { | |
| 686 | + | panic("no return value specified for DetectDatabases") | |
| 687 | + | } | |
| 688 | + | ||
| 689 | + | var r0 []dto.DatabaseInfo | |
| 690 | + | var r1 error | |
| 691 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]dto.DatabaseInfo, error)); ok { | |
| 692 | + | return returnFunc(ctx, backupDomain) | |
| 693 | + | } | |
| 694 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []dto.DatabaseInfo); ok { | |
| 695 | + | r0 = returnFunc(ctx, backupDomain) | |
| 696 | + | } else { | |
| 697 | + | if ret.Get(0) != nil { | |
| 698 | + | r0 = ret.Get(0).([]dto.DatabaseInfo) | |
| 699 | + | } | |
| 700 | + | } | |
| 701 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 702 | + | r1 = returnFunc(ctx, backupDomain) | |
| 703 | + | } else { | |
| 704 | + | r1 = ret.Error(1) | |
| 705 | + | } | |
| 706 | + | return r0, r1 | |
| 707 | + | } | |
| 708 | + | ||
| 709 | + | // MockControlPlane_DetectDatabases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectDatabases' | |
| 710 | + | type MockControlPlane_DetectDatabases_Call struct { | |
| 711 | + | *mock.Call | |
| 712 | + | } | |
| 713 | + | ||
| 714 | + | // DetectDatabases is a helper method to define mock.On call | |
| 715 | + | // - ctx context.Context | |
| 716 | + | // - backupDomain string | |
| 717 | + | func (_e *MockControlPlane_Expecter) DetectDatabases(ctx interface{}, backupDomain interface{}) *MockControlPlane_DetectDatabases_Call { | |
| 718 | + | return &MockControlPlane_DetectDatabases_Call{Call: _e.mock.On("DetectDatabases", ctx, backupDomain)} | |
| 719 | + | } | |
| 720 | + | ||
| 721 | + | func (_c *MockControlPlane_DetectDatabases_Call) Run(run func(ctx context.Context, backupDomain string)) *MockControlPlane_DetectDatabases_Call { | |
| 722 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 723 | + | var arg0 context.Context | |
| 724 | + | if args[0] != nil { | |
| 725 | + | arg0 = args[0].(context.Context) | |
| 726 | + | } | |
| 727 | + | var arg1 string | |
| 728 | + | if args[1] != nil { | |
| 729 | + | arg1 = args[1].(string) | |
| 730 | + | } | |
| 731 | + | run( | |
| 732 | + | arg0, | |
| 733 | + | arg1, | |
| 734 | + | ) | |
| 735 | + | }) | |
| 736 | + | return _c | |
| 737 | + | } | |
| 738 | + | ||
| 739 | + | func (_c *MockControlPlane_DetectDatabases_Call) Return(databaseInfos []dto.DatabaseInfo, err error) *MockControlPlane_DetectDatabases_Call { | |
| 740 | + | _c.Call.Return(databaseInfos, err) | |
| 741 | + | return _c | |
| 742 | + | } | |
| 743 | + | ||
| 744 | + | func (_c *MockControlPlane_DetectDatabases_Call) RunAndReturn(run func(ctx context.Context, backupDomain string) ([]dto.DatabaseInfo, error)) *MockControlPlane_DetectDatabases_Call { | |
| 745 | + | _c.Call.Return(run) | |
| 746 | + | return _c | |
| 747 | + | } | |
| 748 | + | ||
| 749 | + | // FindAttachmentTargetsByImage provides a mock function for the type MockControlPlane | |
| 750 | + | func (_mock *MockControlPlane) FindAttachmentTargetsByImage(ctx context.Context, imageName string) ([]string, error) { | |
| 751 | + | ret := _mock.Called(ctx, imageName) | |
| 752 | + | ||
| 753 | + | if len(ret) == 0 { | |
| 754 | + | panic("no return value specified for FindAttachmentTargetsByImage") | |
| 755 | + | } | |
| 756 | + | ||
| 757 | + | var r0 []string | |
| 758 | + | var r1 error | |
| 759 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { | |
| 760 | + | return returnFunc(ctx, imageName) | |
| 761 | + | } | |
| 762 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok { | |
| 763 | + | r0 = returnFunc(ctx, imageName) | |
| 764 | + | } else { | |
| 765 | + | if ret.Get(0) != nil { | |
| 766 | + | r0 = ret.Get(0).([]string) | |
| 767 | + | } | |
| 768 | + | } | |
| 769 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 770 | + | r1 = returnFunc(ctx, imageName) | |
| 771 | + | } else { | |
| 772 | + | r1 = ret.Error(1) | |
| 773 | + | } | |
| 774 | + | return r0, r1 | |
| 775 | + | } | |
| 776 | + | ||
| 777 | + | // MockControlPlane_FindAttachmentTargetsByImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindAttachmentTargetsByImage' | |
| 778 | + | type MockControlPlane_FindAttachmentTargetsByImage_Call struct { | |
| 779 | + | *mock.Call | |
| 780 | + | } | |
| 781 | + | ||
| 782 | + | // FindAttachmentTargetsByImage is a helper method to define mock.On call | |
| 783 | + | // - ctx context.Context | |
| 784 | + | // - imageName string | |
| 785 | + | func (_e *MockControlPlane_Expecter) FindAttachmentTargetsByImage(ctx interface{}, imageName interface{}) *MockControlPlane_FindAttachmentTargetsByImage_Call { | |
| 786 | + | return &MockControlPlane_FindAttachmentTargetsByImage_Call{Call: _e.mock.On("FindAttachmentTargetsByImage", ctx, imageName)} | |
| 787 | + | } | |
| 788 | + | ||
| 789 | + | func (_c *MockControlPlane_FindAttachmentTargetsByImage_Call) Run(run func(ctx context.Context, imageName string)) *MockControlPlane_FindAttachmentTargetsByImage_Call { | |
| 790 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 791 | + | var arg0 context.Context | |
| 792 | + | if args[0] != nil { | |
| 793 | + | arg0 = args[0].(context.Context) | |
| 794 | + | } | |
| 795 | + | var arg1 string | |
| 796 | + | if args[1] != nil { | |
| 797 | + | arg1 = args[1].(string) | |
| 798 | + | } | |
| 799 | + | run( | |
| 800 | + | arg0, | |
| 801 | + | arg1, | |
| 802 | + | ) | |
| 803 | + | }) | |
| 804 | + | return _c | |
| 805 | + | } | |
| 806 | + | ||
| 807 | + | func (_c *MockControlPlane_FindAttachmentTargetsByImage_Call) Return(strings []string, err error) *MockControlPlane_FindAttachmentTargetsByImage_Call { | |
| 808 | + | _c.Call.Return(strings, err) | |
| 809 | + | return _c | |
| 810 | + | } | |
| 811 | + | ||
| 812 | + | func (_c *MockControlPlane_FindAttachmentTargetsByImage_Call) RunAndReturn(run func(ctx context.Context, imageName string) ([]string, error)) *MockControlPlane_FindAttachmentTargetsByImage_Call { | |
| 813 | + | _c.Call.Return(run) | |
| 814 | + | return _c | |
| 815 | + | } | |
| 816 | + | ||
| 817 | + | // FindRoutesByImage provides a mock function for the type MockControlPlane | |
| 818 | + | func (_mock *MockControlPlane) FindRoutesByImage(ctx context.Context, imageName string) ([]domain.Route, error) { | |
| 819 | + | ret := _mock.Called(ctx, imageName) | |
| 820 | + | ||
| 821 | + | if len(ret) == 0 { | |
| 822 | + | panic("no return value specified for FindRoutesByImage") | |
| 823 | + | } | |
| 824 | + | ||
| 825 | + | var r0 []domain.Route | |
| 826 | + | var r1 error | |
| 827 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]domain.Route, error)); ok { | |
| 828 | + | return returnFunc(ctx, imageName) | |
| 829 | + | } | |
| 830 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []domain.Route); ok { | |
| 831 | + | r0 = returnFunc(ctx, imageName) | |
| 832 | + | } else { | |
| 833 | + | if ret.Get(0) != nil { | |
| 834 | + | r0 = ret.Get(0).([]domain.Route) | |
| 835 | + | } | |
| 836 | + | } | |
| 837 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 838 | + | r1 = returnFunc(ctx, imageName) | |
| 839 | + | } else { | |
| 840 | + | r1 = ret.Error(1) | |
| 841 | + | } | |
| 842 | + | return r0, r1 | |
| 843 | + | } | |
| 844 | + | ||
| 845 | + | // MockControlPlane_FindRoutesByImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindRoutesByImage' | |
| 846 | + | type MockControlPlane_FindRoutesByImage_Call struct { | |
| 847 | + | *mock.Call | |
| 848 | + | } | |
| 849 | + | ||
| 850 | + | // FindRoutesByImage is a helper method to define mock.On call | |
| 851 | + | // - ctx context.Context | |
| 852 | + | // - imageName string | |
| 853 | + | func (_e *MockControlPlane_Expecter) FindRoutesByImage(ctx interface{}, imageName interface{}) *MockControlPlane_FindRoutesByImage_Call { | |
| 854 | + | return &MockControlPlane_FindRoutesByImage_Call{Call: _e.mock.On("FindRoutesByImage", ctx, imageName)} | |
| 855 | + | } | |
| 856 | + | ||
| 857 | + | func (_c *MockControlPlane_FindRoutesByImage_Call) Run(run func(ctx context.Context, imageName string)) *MockControlPlane_FindRoutesByImage_Call { | |
| 858 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 859 | + | var arg0 context.Context | |
| 860 | + | if args[0] != nil { | |
| 861 | + | arg0 = args[0].(context.Context) | |
| 862 | + | } | |
| 863 | + | var arg1 string | |
| 864 | + | if args[1] != nil { | |
| 865 | + | arg1 = args[1].(string) | |
| 866 | + | } | |
| 867 | + | run( | |
| 868 | + | arg0, | |
| 869 | + | arg1, | |
| 870 | + | ) | |
| 871 | + | }) | |
| 872 | + | return _c | |
| 873 | + | } | |
| 874 | + | ||
| 875 | + | func (_c *MockControlPlane_FindRoutesByImage_Call) Return(routes []domain.Route, err error) *MockControlPlane_FindRoutesByImage_Call { | |
| 876 | + | _c.Call.Return(routes, err) | |
| 877 | + | return _c | |
| 878 | + | } | |
| 879 | + | ||
| 880 | + | func (_c *MockControlPlane_FindRoutesByImage_Call) RunAndReturn(run func(ctx context.Context, imageName string) ([]domain.Route, error)) *MockControlPlane_FindRoutesByImage_Call { | |
| 881 | + | _c.Call.Return(run) | |
| 882 | + | return _c | |
| 883 | + | } | |
| 884 | + | ||
| 885 | + | // GetAllAttachmentsConfig provides a mock function for the type MockControlPlane | |
| 886 | + | func (_mock *MockControlPlane) GetAllAttachmentsConfig(ctx context.Context) (map[string][]string, error) { | |
| 887 | + | ret := _mock.Called(ctx) | |
| 888 | + | ||
| 889 | + | if len(ret) == 0 { | |
| 890 | + | panic("no return value specified for GetAllAttachmentsConfig") | |
| 891 | + | } | |
| 892 | + | ||
| 893 | + | var r0 map[string][]string | |
| 894 | + | var r1 error | |
| 895 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (map[string][]string, error)); ok { | |
| 896 | + | return returnFunc(ctx) | |
| 897 | + | } | |
| 898 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) map[string][]string); ok { | |
| 899 | + | r0 = returnFunc(ctx) | |
| 900 | + | } else { | |
| 901 | + | if ret.Get(0) != nil { | |
| 902 | + | r0 = ret.Get(0).(map[string][]string) | |
| 903 | + | } | |
| 904 | + | } | |
| 905 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 906 | + | r1 = returnFunc(ctx) | |
| 907 | + | } else { | |
| 908 | + | r1 = ret.Error(1) | |
| 909 | + | } | |
| 910 | + | return r0, r1 | |
| 911 | + | } | |
| 912 | + | ||
| 913 | + | // MockControlPlane_GetAllAttachmentsConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllAttachmentsConfig' | |
| 914 | + | type MockControlPlane_GetAllAttachmentsConfig_Call struct { | |
| 915 | + | *mock.Call | |
| 916 | + | } | |
| 917 | + | ||
| 918 | + | // GetAllAttachmentsConfig is a helper method to define mock.On call | |
| 919 | + | // - ctx context.Context | |
| 920 | + | func (_e *MockControlPlane_Expecter) GetAllAttachmentsConfig(ctx interface{}) *MockControlPlane_GetAllAttachmentsConfig_Call { | |
| 921 | + | return &MockControlPlane_GetAllAttachmentsConfig_Call{Call: _e.mock.On("GetAllAttachmentsConfig", ctx)} | |
| 922 | + | } | |
| 923 | + | ||
| 924 | + | func (_c *MockControlPlane_GetAllAttachmentsConfig_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetAllAttachmentsConfig_Call { | |
| 925 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 926 | + | var arg0 context.Context | |
| 927 | + | if args[0] != nil { | |
| 928 | + | arg0 = args[0].(context.Context) | |
| 929 | + | } | |
| 930 | + | run( | |
| 931 | + | arg0, | |
| 932 | + | ) | |
| 933 | + | }) | |
| 934 | + | return _c | |
| 935 | + | } | |
| 936 | + | ||
| 937 | + | func (_c *MockControlPlane_GetAllAttachmentsConfig_Call) Return(stringToStrings map[string][]string, err error) *MockControlPlane_GetAllAttachmentsConfig_Call { | |
| 938 | + | _c.Call.Return(stringToStrings, err) | |
| 939 | + | return _c | |
| 940 | + | } | |
| 941 | + | ||
| 942 | + | func (_c *MockControlPlane_GetAllAttachmentsConfig_Call) RunAndReturn(run func(ctx context.Context) (map[string][]string, error)) *MockControlPlane_GetAllAttachmentsConfig_Call { | |
| 943 | + | _c.Call.Return(run) | |
| 944 | + | return _c | |
| 945 | + | } | |
| 946 | + | ||
| 947 | + | // GetAttachmentsConfig provides a mock function for the type MockControlPlane | |
| 948 | + | func (_mock *MockControlPlane) GetAttachmentsConfig(ctx context.Context, domainOrGroup string) ([]string, error) { | |
| 949 | + | ret := _mock.Called(ctx, domainOrGroup) | |
| 950 | + | ||
| 951 | + | if len(ret) == 0 { | |
| 952 | + | panic("no return value specified for GetAttachmentsConfig") | |
| 953 | + | } | |
| 954 | + | ||
| 955 | + | var r0 []string | |
| 956 | + | var r1 error | |
| 957 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { | |
| 958 | + | return returnFunc(ctx, domainOrGroup) | |
| 959 | + | } | |
| 960 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok { | |
| 961 | + | r0 = returnFunc(ctx, domainOrGroup) | |
| 962 | + | } else { | |
| 963 | + | if ret.Get(0) != nil { | |
| 964 | + | r0 = ret.Get(0).([]string) | |
| 965 | + | } | |
| 966 | + | } | |
| 967 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 968 | + | r1 = returnFunc(ctx, domainOrGroup) | |
| 969 | + | } else { | |
| 970 | + | r1 = ret.Error(1) | |
| 971 | + | } | |
| 972 | + | return r0, r1 | |
| 973 | + | } | |
| 974 | + | ||
| 975 | + | // MockControlPlane_GetAttachmentsConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAttachmentsConfig' | |
| 976 | + | type MockControlPlane_GetAttachmentsConfig_Call struct { | |
| 977 | + | *mock.Call | |
| 978 | + | } | |
| 979 | + | ||
| 980 | + | // GetAttachmentsConfig is a helper method to define mock.On call | |
| 981 | + | // - ctx context.Context | |
| 982 | + | // - domainOrGroup string | |
| 983 | + | func (_e *MockControlPlane_Expecter) GetAttachmentsConfig(ctx interface{}, domainOrGroup interface{}) *MockControlPlane_GetAttachmentsConfig_Call { | |
| 984 | + | return &MockControlPlane_GetAttachmentsConfig_Call{Call: _e.mock.On("GetAttachmentsConfig", ctx, domainOrGroup)} | |
| 985 | + | } | |
| 986 | + | ||
| 987 | + | func (_c *MockControlPlane_GetAttachmentsConfig_Call) Run(run func(ctx context.Context, domainOrGroup string)) *MockControlPlane_GetAttachmentsConfig_Call { | |
| 988 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 989 | + | var arg0 context.Context | |
| 990 | + | if args[0] != nil { | |
| 991 | + | arg0 = args[0].(context.Context) | |
| 992 | + | } | |
| 993 | + | var arg1 string | |
| 994 | + | if args[1] != nil { | |
| 995 | + | arg1 = args[1].(string) | |
| 996 | + | } | |
| 997 | + | run( | |
| 998 | + | arg0, | |
| 999 | + | arg1, | |
| 1000 | + | ) | |
| 1001 | + | }) | |
| 1002 | + | return _c | |
| 1003 | + | } | |
| 1004 | + | ||
| 1005 | + | func (_c *MockControlPlane_GetAttachmentsConfig_Call) Return(strings []string, err error) *MockControlPlane_GetAttachmentsConfig_Call { | |
| 1006 | + | _c.Call.Return(strings, err) | |
| 1007 | + | return _c | |
| 1008 | + | } | |
| 1009 | + | ||
| 1010 | + | func (_c *MockControlPlane_GetAttachmentsConfig_Call) RunAndReturn(run func(ctx context.Context, domainOrGroup string) ([]string, error)) *MockControlPlane_GetAttachmentsConfig_Call { | |
| 1011 | + | _c.Call.Return(run) | |
| 1012 | + | return _c | |
| 1013 | + | } | |
| 1014 | + | ||
| 1015 | + | // GetAutoRouteAllowedDomains provides a mock function for the type MockControlPlane | |
| 1016 | + | func (_mock *MockControlPlane) GetAutoRouteAllowedDomains(ctx context.Context) ([]string, error) { | |
| 1017 | + | ret := _mock.Called(ctx) | |
| 1018 | + | ||
| 1019 | + | if len(ret) == 0 { | |
| 1020 | + | panic("no return value specified for GetAutoRouteAllowedDomains") | |
| 1021 | + | } | |
| 1022 | + | ||
| 1023 | + | var r0 []string | |
| 1024 | + | var r1 error | |
| 1025 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { | |
| 1026 | + | return returnFunc(ctx) | |
| 1027 | + | } | |
| 1028 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { | |
| 1029 | + | r0 = returnFunc(ctx) | |
| 1030 | + | } else { | |
| 1031 | + | if ret.Get(0) != nil { | |
| 1032 | + | r0 = ret.Get(0).([]string) | |
| 1033 | + | } | |
| 1034 | + | } | |
| 1035 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 1036 | + | r1 = returnFunc(ctx) | |
| 1037 | + | } else { | |
| 1038 | + | r1 = ret.Error(1) | |
| 1039 | + | } | |
| 1040 | + | return r0, r1 | |
| 1041 | + | } | |
| 1042 | + | ||
| 1043 | + | // MockControlPlane_GetAutoRouteAllowedDomains_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAutoRouteAllowedDomains' | |
| 1044 | + | type MockControlPlane_GetAutoRouteAllowedDomains_Call struct { | |
| 1045 | + | *mock.Call | |
| 1046 | + | } | |
| 1047 | + | ||
| 1048 | + | // GetAutoRouteAllowedDomains is a helper method to define mock.On call | |
| 1049 | + | // - ctx context.Context | |
| 1050 | + | func (_e *MockControlPlane_Expecter) GetAutoRouteAllowedDomains(ctx interface{}) *MockControlPlane_GetAutoRouteAllowedDomains_Call { | |
| 1051 | + | return &MockControlPlane_GetAutoRouteAllowedDomains_Call{Call: _e.mock.On("GetAutoRouteAllowedDomains", ctx)} | |
| 1052 | + | } | |
| 1053 | + | ||
| 1054 | + | func (_c *MockControlPlane_GetAutoRouteAllowedDomains_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetAutoRouteAllowedDomains_Call { | |
| 1055 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1056 | + | var arg0 context.Context | |
| 1057 | + | if args[0] != nil { | |
| 1058 | + | arg0 = args[0].(context.Context) | |
| 1059 | + | } | |
| 1060 | + | run( | |
| 1061 | + | arg0, | |
| 1062 | + | ) | |
| 1063 | + | }) | |
| 1064 | + | return _c | |
| 1065 | + | } | |
| 1066 | + | ||
| 1067 | + | func (_c *MockControlPlane_GetAutoRouteAllowedDomains_Call) Return(strings []string, err error) *MockControlPlane_GetAutoRouteAllowedDomains_Call { | |
| 1068 | + | _c.Call.Return(strings, err) | |
| 1069 | + | return _c | |
| 1070 | + | } | |
| 1071 | + | ||
| 1072 | + | func (_c *MockControlPlane_GetAutoRouteAllowedDomains_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockControlPlane_GetAutoRouteAllowedDomains_Call { | |
| 1073 | + | _c.Call.Return(run) | |
| 1074 | + | return _c | |
| 1075 | + | } | |
| 1076 | + | ||
| 1077 | + | // GetConfig provides a mock function for the type MockControlPlane | |
| 1078 | + | func (_mock *MockControlPlane) GetConfig(ctx context.Context) (*remote.Config, error) { | |
| 1079 | + | ret := _mock.Called(ctx) | |
| 1080 | + | ||
| 1081 | + | if len(ret) == 0 { | |
| 1082 | + | panic("no return value specified for GetConfig") | |
| 1083 | + | } | |
| 1084 | + | ||
| 1085 | + | var r0 *remote.Config | |
| 1086 | + | var r1 error | |
| 1087 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*remote.Config, error)); ok { | |
| 1088 | + | return returnFunc(ctx) | |
| 1089 | + | } | |
| 1090 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *remote.Config); ok { | |
| 1091 | + | r0 = returnFunc(ctx) | |
| 1092 | + | } else { | |
| 1093 | + | if ret.Get(0) != nil { | |
| 1094 | + | r0 = ret.Get(0).(*remote.Config) | |
| 1095 | + | } | |
| 1096 | + | } | |
| 1097 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 1098 | + | r1 = returnFunc(ctx) | |
| 1099 | + | } else { | |
| 1100 | + | r1 = ret.Error(1) | |
| 1101 | + | } | |
| 1102 | + | return r0, r1 | |
| 1103 | + | } | |
| 1104 | + | ||
| 1105 | + | // MockControlPlane_GetConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfig' | |
| 1106 | + | type MockControlPlane_GetConfig_Call struct { | |
| 1107 | + | *mock.Call | |
| 1108 | + | } | |
| 1109 | + | ||
| 1110 | + | // GetConfig is a helper method to define mock.On call | |
| 1111 | + | // - ctx context.Context | |
| 1112 | + | func (_e *MockControlPlane_Expecter) GetConfig(ctx interface{}) *MockControlPlane_GetConfig_Call { | |
| 1113 | + | return &MockControlPlane_GetConfig_Call{Call: _e.mock.On("GetConfig", ctx)} | |
| 1114 | + | } | |
| 1115 | + | ||
| 1116 | + | func (_c *MockControlPlane_GetConfig_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetConfig_Call { | |
| 1117 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1118 | + | var arg0 context.Context | |
| 1119 | + | if args[0] != nil { | |
| 1120 | + | arg0 = args[0].(context.Context) | |
| 1121 | + | } | |
| 1122 | + | run( | |
| 1123 | + | arg0, | |
| 1124 | + | ) | |
| 1125 | + | }) | |
| 1126 | + | return _c | |
| 1127 | + | } | |
| 1128 | + | ||
| 1129 | + | func (_c *MockControlPlane_GetConfig_Call) Return(config *remote.Config, err error) *MockControlPlane_GetConfig_Call { | |
| 1130 | + | _c.Call.Return(config, err) | |
| 1131 | + | return _c | |
| 1132 | + | } | |
| 1133 | + | ||
| 1134 | + | func (_c *MockControlPlane_GetConfig_Call) RunAndReturn(run func(ctx context.Context) (*remote.Config, error)) *MockControlPlane_GetConfig_Call { | |
| 1135 | + | _c.Call.Return(run) | |
| 1136 | + | return _c | |
| 1137 | + | } | |
| 1138 | + | ||
| 1139 | + | // GetContainerLogs provides a mock function for the type MockControlPlane | |
| 1140 | + | func (_mock *MockControlPlane) GetContainerLogs(ctx context.Context, logDomain string, lines int) ([]string, error) { | |
| 1141 | + | ret := _mock.Called(ctx, logDomain, lines) | |
| 1142 | + | ||
| 1143 | + | if len(ret) == 0 { | |
| 1144 | + | panic("no return value specified for GetContainerLogs") | |
| 1145 | + | } | |
| 1146 | + | ||
| 1147 | + | var r0 []string | |
| 1148 | + | var r1 error | |
| 1149 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) ([]string, error)); ok { | |
| 1150 | + | return returnFunc(ctx, logDomain, lines) | |
| 1151 | + | } | |
| 1152 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) []string); ok { | |
| 1153 | + | r0 = returnFunc(ctx, logDomain, lines) | |
| 1154 | + | } else { | |
| 1155 | + | if ret.Get(0) != nil { | |
| 1156 | + | r0 = ret.Get(0).([]string) | |
| 1157 | + | } | |
| 1158 | + | } | |
| 1159 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, int) error); ok { | |
| 1160 | + | r1 = returnFunc(ctx, logDomain, lines) | |
| 1161 | + | } else { | |
| 1162 | + | r1 = ret.Error(1) | |
| 1163 | + | } | |
| 1164 | + | return r0, r1 | |
| 1165 | + | } | |
| 1166 | + | ||
| 1167 | + | // MockControlPlane_GetContainerLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerLogs' | |
| 1168 | + | type MockControlPlane_GetContainerLogs_Call struct { | |
| 1169 | + | *mock.Call | |
| 1170 | + | } | |
| 1171 | + | ||
| 1172 | + | // GetContainerLogs is a helper method to define mock.On call | |
| 1173 | + | // - ctx context.Context | |
| 1174 | + | // - logDomain string | |
| 1175 | + | // - lines int | |
| 1176 | + | func (_e *MockControlPlane_Expecter) GetContainerLogs(ctx interface{}, logDomain interface{}, lines interface{}) *MockControlPlane_GetContainerLogs_Call { | |
| 1177 | + | return &MockControlPlane_GetContainerLogs_Call{Call: _e.mock.On("GetContainerLogs", ctx, logDomain, lines)} | |
| 1178 | + | } | |
| 1179 | + | ||
| 1180 | + | func (_c *MockControlPlane_GetContainerLogs_Call) Run(run func(ctx context.Context, logDomain string, lines int)) *MockControlPlane_GetContainerLogs_Call { | |
| 1181 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1182 | + | var arg0 context.Context | |
| 1183 | + | if args[0] != nil { | |
| 1184 | + | arg0 = args[0].(context.Context) | |
| 1185 | + | } | |
| 1186 | + | var arg1 string | |
| 1187 | + | if args[1] != nil { | |
| 1188 | + | arg1 = args[1].(string) | |
| 1189 | + | } | |
| 1190 | + | var arg2 int | |
| 1191 | + | if args[2] != nil { | |
| 1192 | + | arg2 = args[2].(int) | |
| 1193 | + | } | |
| 1194 | + | run( | |
| 1195 | + | arg0, | |
| 1196 | + | arg1, | |
| 1197 | + | arg2, | |
| 1198 | + | ) | |
| 1199 | + | }) | |
| 1200 | + | return _c | |
| 1201 | + | } | |
| 1202 | + | ||
| 1203 | + | func (_c *MockControlPlane_GetContainerLogs_Call) Return(strings []string, err error) *MockControlPlane_GetContainerLogs_Call { | |
| 1204 | + | _c.Call.Return(strings, err) | |
| 1205 | + | return _c | |
| 1206 | + | } | |
| 1207 | + | ||
| 1208 | + | func (_c *MockControlPlane_GetContainerLogs_Call) RunAndReturn(run func(ctx context.Context, logDomain string, lines int) ([]string, error)) *MockControlPlane_GetContainerLogs_Call { | |
| 1209 | + | _c.Call.Return(run) | |
| 1210 | + | return _c | |
| 1211 | + | } | |
| 1212 | + | ||
| 1213 | + | // GetHealth provides a mock function for the type MockControlPlane | |
| 1214 | + | func (_mock *MockControlPlane) GetHealth(ctx context.Context) (map[string]*remote.RouteHealth, error) { | |
| 1215 | + | ret := _mock.Called(ctx) | |
| 1216 | + | ||
| 1217 | + | if len(ret) == 0 { | |
| 1218 | + | panic("no return value specified for GetHealth") | |
| 1219 | + | } | |
| 1220 | + | ||
| 1221 | + | var r0 map[string]*remote.RouteHealth | |
| 1222 | + | var r1 error | |
| 1223 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (map[string]*remote.RouteHealth, error)); ok { | |
| 1224 | + | return returnFunc(ctx) | |
| 1225 | + | } | |
| 1226 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) map[string]*remote.RouteHealth); ok { | |
| 1227 | + | r0 = returnFunc(ctx) | |
| 1228 | + | } else { | |
| 1229 | + | if ret.Get(0) != nil { | |
| 1230 | + | r0 = ret.Get(0).(map[string]*remote.RouteHealth) | |
| 1231 | + | } | |
| 1232 | + | } | |
| 1233 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 1234 | + | r1 = returnFunc(ctx) | |
| 1235 | + | } else { | |
| 1236 | + | r1 = ret.Error(1) | |
| 1237 | + | } | |
| 1238 | + | return r0, r1 | |
| 1239 | + | } | |
| 1240 | + | ||
| 1241 | + | // MockControlPlane_GetHealth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHealth' | |
| 1242 | + | type MockControlPlane_GetHealth_Call struct { | |
| 1243 | + | *mock.Call | |
| 1244 | + | } | |
| 1245 | + | ||
| 1246 | + | // GetHealth is a helper method to define mock.On call | |
| 1247 | + | // - ctx context.Context | |
| 1248 | + | func (_e *MockControlPlane_Expecter) GetHealth(ctx interface{}) *MockControlPlane_GetHealth_Call { | |
| 1249 | + | return &MockControlPlane_GetHealth_Call{Call: _e.mock.On("GetHealth", ctx)} | |
| 1250 | + | } | |
| 1251 | + | ||
| 1252 | + | func (_c *MockControlPlane_GetHealth_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetHealth_Call { | |
| 1253 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1254 | + | var arg0 context.Context | |
| 1255 | + | if args[0] != nil { | |
| 1256 | + | arg0 = args[0].(context.Context) | |
| 1257 | + | } | |
| 1258 | + | run( | |
| 1259 | + | arg0, | |
| 1260 | + | ) | |
| 1261 | + | }) | |
| 1262 | + | return _c | |
| 1263 | + | } | |
| 1264 | + | ||
| 1265 | + | func (_c *MockControlPlane_GetHealth_Call) Return(stringToRouteHealth map[string]*remote.RouteHealth, err error) *MockControlPlane_GetHealth_Call { | |
| 1266 | + | _c.Call.Return(stringToRouteHealth, err) | |
| 1267 | + | return _c | |
| 1268 | + | } | |
| 1269 | + | ||
| 1270 | + | func (_c *MockControlPlane_GetHealth_Call) RunAndReturn(run func(ctx context.Context) (map[string]*remote.RouteHealth, error)) *MockControlPlane_GetHealth_Call { | |
| 1271 | + | _c.Call.Return(run) | |
| 1272 | + | return _c | |
| 1273 | + | } | |
| 1274 | + | ||
| 1275 | + | // GetProcessLogs provides a mock function for the type MockControlPlane | |
| 1276 | + | func (_mock *MockControlPlane) GetProcessLogs(ctx context.Context, lines int) ([]string, error) { | |
| 1277 | + | ret := _mock.Called(ctx, lines) | |
| 1278 | + | ||
| 1279 | + | if len(ret) == 0 { | |
| 1280 | + | panic("no return value specified for GetProcessLogs") | |
| 1281 | + | } | |
| 1282 | + | ||
| 1283 | + | var r0 []string | |
| 1284 | + | var r1 error | |
| 1285 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]string, error)); ok { | |
| 1286 | + | return returnFunc(ctx, lines) | |
| 1287 | + | } | |
| 1288 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) []string); ok { | |
| 1289 | + | r0 = returnFunc(ctx, lines) | |
| 1290 | + | } else { | |
| 1291 | + | if ret.Get(0) != nil { | |
| 1292 | + | r0 = ret.Get(0).([]string) | |
| 1293 | + | } | |
| 1294 | + | } | |
| 1295 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |
| 1296 | + | r1 = returnFunc(ctx, lines) | |
| 1297 | + | } else { | |
| 1298 | + | r1 = ret.Error(1) | |
| 1299 | + | } | |
| 1300 | + | return r0, r1 | |
| 1301 | + | } | |
| 1302 | + | ||
| 1303 | + | // MockControlPlane_GetProcessLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProcessLogs' | |
| 1304 | + | type MockControlPlane_GetProcessLogs_Call struct { | |
| 1305 | + | *mock.Call | |
| 1306 | + | } | |
| 1307 | + | ||
| 1308 | + | // GetProcessLogs is a helper method to define mock.On call | |
| 1309 | + | // - ctx context.Context | |
| 1310 | + | // - lines int | |
| 1311 | + | func (_e *MockControlPlane_Expecter) GetProcessLogs(ctx interface{}, lines interface{}) *MockControlPlane_GetProcessLogs_Call { | |
| 1312 | + | return &MockControlPlane_GetProcessLogs_Call{Call: _e.mock.On("GetProcessLogs", ctx, lines)} | |
| 1313 | + | } | |
| 1314 | + | ||
| 1315 | + | func (_c *MockControlPlane_GetProcessLogs_Call) Run(run func(ctx context.Context, lines int)) *MockControlPlane_GetProcessLogs_Call { | |
| 1316 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1317 | + | var arg0 context.Context | |
| 1318 | + | if args[0] != nil { | |
| 1319 | + | arg0 = args[0].(context.Context) | |
| 1320 | + | } | |
| 1321 | + | var arg1 int | |
| 1322 | + | if args[1] != nil { | |
| 1323 | + | arg1 = args[1].(int) | |
| 1324 | + | } | |
| 1325 | + | run( | |
| 1326 | + | arg0, | |
| 1327 | + | arg1, | |
| 1328 | + | ) | |
| 1329 | + | }) | |
| 1330 | + | return _c | |
| 1331 | + | } | |
| 1332 | + | ||
| 1333 | + | func (_c *MockControlPlane_GetProcessLogs_Call) Return(strings []string, err error) *MockControlPlane_GetProcessLogs_Call { | |
| 1334 | + | _c.Call.Return(strings, err) | |
| 1335 | + | return _c | |
| 1336 | + | } | |
| 1337 | + | ||
| 1338 | + | func (_c *MockControlPlane_GetProcessLogs_Call) RunAndReturn(run func(ctx context.Context, lines int) ([]string, error)) *MockControlPlane_GetProcessLogs_Call { | |
| 1339 | + | _c.Call.Return(run) | |
| 1340 | + | return _c | |
| 1341 | + | } | |
| 1342 | + | ||
| 1343 | + | // GetRoute provides a mock function for the type MockControlPlane | |
| 1344 | + | func (_mock *MockControlPlane) GetRoute(ctx context.Context, routeDomain string) (*domain.Route, error) { | |
| 1345 | + | ret := _mock.Called(ctx, routeDomain) | |
| 1346 | + | ||
| 1347 | + | if len(ret) == 0 { | |
| 1348 | + | panic("no return value specified for GetRoute") | |
| 1349 | + | } | |
| 1350 | + | ||
| 1351 | + | var r0 *domain.Route | |
| 1352 | + | var r1 error | |
| 1353 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*domain.Route, error)); ok { | |
| 1354 | + | return returnFunc(ctx, routeDomain) | |
| 1355 | + | } | |
| 1356 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *domain.Route); ok { | |
| 1357 | + | r0 = returnFunc(ctx, routeDomain) | |
| 1358 | + | } else { | |
| 1359 | + | if ret.Get(0) != nil { | |
| 1360 | + | r0 = ret.Get(0).(*domain.Route) | |
| 1361 | + | } | |
| 1362 | + | } | |
| 1363 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 1364 | + | r1 = returnFunc(ctx, routeDomain) | |
| 1365 | + | } else { | |
| 1366 | + | r1 = ret.Error(1) | |
| 1367 | + | } | |
| 1368 | + | return r0, r1 | |
| 1369 | + | } | |
| 1370 | + | ||
| 1371 | + | // MockControlPlane_GetRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRoute' | |
| 1372 | + | type MockControlPlane_GetRoute_Call struct { | |
| 1373 | + | *mock.Call | |
| 1374 | + | } | |
| 1375 | + | ||
| 1376 | + | // GetRoute is a helper method to define mock.On call | |
| 1377 | + | // - ctx context.Context | |
| 1378 | + | // - routeDomain string | |
| 1379 | + | func (_e *MockControlPlane_Expecter) GetRoute(ctx interface{}, routeDomain interface{}) *MockControlPlane_GetRoute_Call { | |
| 1380 | + | return &MockControlPlane_GetRoute_Call{Call: _e.mock.On("GetRoute", ctx, routeDomain)} | |
| 1381 | + | } | |
| 1382 | + | ||
| 1383 | + | func (_c *MockControlPlane_GetRoute_Call) Run(run func(ctx context.Context, routeDomain string)) *MockControlPlane_GetRoute_Call { | |
| 1384 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1385 | + | var arg0 context.Context | |
| 1386 | + | if args[0] != nil { | |
| 1387 | + | arg0 = args[0].(context.Context) | |
| 1388 | + | } | |
| 1389 | + | var arg1 string | |
| 1390 | + | if args[1] != nil { | |
| 1391 | + | arg1 = args[1].(string) | |
| 1392 | + | } | |
| 1393 | + | run( | |
| 1394 | + | arg0, | |
| 1395 | + | arg1, | |
| 1396 | + | ) | |
| 1397 | + | }) | |
| 1398 | + | return _c | |
| 1399 | + | } | |
| 1400 | + | ||
| 1401 | + | func (_c *MockControlPlane_GetRoute_Call) Return(route *domain.Route, err error) *MockControlPlane_GetRoute_Call { | |
| 1402 | + | _c.Call.Return(route, err) | |
| 1403 | + | return _c | |
| 1404 | + | } | |
| 1405 | + | ||
| 1406 | + | func (_c *MockControlPlane_GetRoute_Call) RunAndReturn(run func(ctx context.Context, routeDomain string) (*domain.Route, error)) *MockControlPlane_GetRoute_Call { | |
| 1407 | + | _c.Call.Return(run) | |
| 1408 | + | return _c | |
| 1409 | + | } | |
| 1410 | + | ||
| 1411 | + | // GetStatus provides a mock function for the type MockControlPlane | |
| 1412 | + | func (_mock *MockControlPlane) GetStatus(ctx context.Context) (*remote.Status, error) { | |
| 1413 | + | ret := _mock.Called(ctx) | |
| 1414 | + | ||
| 1415 | + | if len(ret) == 0 { | |
| 1416 | + | panic("no return value specified for GetStatus") | |
| 1417 | + | } | |
| 1418 | + | ||
| 1419 | + | var r0 *remote.Status | |
| 1420 | + | var r1 error | |
| 1421 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*remote.Status, error)); ok { | |
| 1422 | + | return returnFunc(ctx) | |
| 1423 | + | } | |
| 1424 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *remote.Status); ok { | |
| 1425 | + | r0 = returnFunc(ctx) | |
| 1426 | + | } else { | |
| 1427 | + | if ret.Get(0) != nil { | |
| 1428 | + | r0 = ret.Get(0).(*remote.Status) | |
| 1429 | + | } | |
| 1430 | + | } | |
| 1431 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 1432 | + | r1 = returnFunc(ctx) | |
| 1433 | + | } else { | |
| 1434 | + | r1 = ret.Error(1) | |
| 1435 | + | } | |
| 1436 | + | return r0, r1 | |
| 1437 | + | } | |
| 1438 | + | ||
| 1439 | + | // MockControlPlane_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus' | |
| 1440 | + | type MockControlPlane_GetStatus_Call struct { | |
| 1441 | + | *mock.Call | |
| 1442 | + | } | |
| 1443 | + | ||
| 1444 | + | // GetStatus is a helper method to define mock.On call | |
| 1445 | + | // - ctx context.Context | |
| 1446 | + | func (_e *MockControlPlane_Expecter) GetStatus(ctx interface{}) *MockControlPlane_GetStatus_Call { | |
| 1447 | + | return &MockControlPlane_GetStatus_Call{Call: _e.mock.On("GetStatus", ctx)} | |
| 1448 | + | } | |
| 1449 | + | ||
| 1450 | + | func (_c *MockControlPlane_GetStatus_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetStatus_Call { | |
| 1451 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1452 | + | var arg0 context.Context | |
| 1453 | + | if args[0] != nil { | |
| 1454 | + | arg0 = args[0].(context.Context) | |
| 1455 | + | } | |
| 1456 | + | run( | |
| 1457 | + | arg0, | |
| 1458 | + | ) | |
| 1459 | + | }) | |
| 1460 | + | return _c | |
| 1461 | + | } | |
| 1462 | + | ||
| 1463 | + | func (_c *MockControlPlane_GetStatus_Call) Return(status *remote.Status, err error) *MockControlPlane_GetStatus_Call { | |
| 1464 | + | _c.Call.Return(status, err) | |
| 1465 | + | return _c | |
| 1466 | + | } | |
| 1467 | + | ||
| 1468 | + | func (_c *MockControlPlane_GetStatus_Call) RunAndReturn(run func(ctx context.Context) (*remote.Status, error)) *MockControlPlane_GetStatus_Call { | |
| 1469 | + | _c.Call.Return(run) | |
| 1470 | + | return _c | |
| 1471 | + | } | |
| 1472 | + | ||
| 1473 | + | // GetTLSStatus provides a mock function for the type MockControlPlane | |
| 1474 | + | func (_mock *MockControlPlane) GetTLSStatus(ctx context.Context) (*dto.TLSStatusResponse, error) { | |
| 1475 | + | ret := _mock.Called(ctx) | |
| 1476 | + | ||
| 1477 | + | if len(ret) == 0 { | |
| 1478 | + | panic("no return value specified for GetTLSStatus") | |
| 1479 | + | } | |
| 1480 | + | ||
| 1481 | + | var r0 *dto.TLSStatusResponse | |
| 1482 | + | var r1 error | |
| 1483 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*dto.TLSStatusResponse, error)); ok { | |
| 1484 | + | return returnFunc(ctx) | |
| 1485 | + | } | |
| 1486 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *dto.TLSStatusResponse); ok { | |
| 1487 | + | r0 = returnFunc(ctx) | |
| 1488 | + | } else { | |
| 1489 | + | if ret.Get(0) != nil { | |
| 1490 | + | r0 = ret.Get(0).(*dto.TLSStatusResponse) | |
| 1491 | + | } | |
| 1492 | + | } | |
| 1493 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 1494 | + | r1 = returnFunc(ctx) | |
| 1495 | + | } else { | |
| 1496 | + | r1 = ret.Error(1) | |
| 1497 | + | } | |
| 1498 | + | return r0, r1 | |
| 1499 | + | } | |
| 1500 | + | ||
| 1501 | + | // MockControlPlane_GetTLSStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTLSStatus' | |
| 1502 | + | type MockControlPlane_GetTLSStatus_Call struct { | |
| 1503 | + | *mock.Call | |
| 1504 | + | } | |
| 1505 | + | ||
| 1506 | + | // GetTLSStatus is a helper method to define mock.On call | |
| 1507 | + | // - ctx context.Context | |
| 1508 | + | func (_e *MockControlPlane_Expecter) GetTLSStatus(ctx interface{}) *MockControlPlane_GetTLSStatus_Call { | |
| 1509 | + | return &MockControlPlane_GetTLSStatus_Call{Call: _e.mock.On("GetTLSStatus", ctx)} | |
| 1510 | + | } | |
| 1511 | + | ||
| 1512 | + | func (_c *MockControlPlane_GetTLSStatus_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetTLSStatus_Call { | |
| 1513 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1514 | + | var arg0 context.Context | |
| 1515 | + | if args[0] != nil { | |
| 1516 | + | arg0 = args[0].(context.Context) | |
| 1517 | + | } | |
| 1518 | + | run( | |
| 1519 | + | arg0, | |
| 1520 | + | ) | |
| 1521 | + | }) | |
| 1522 | + | return _c | |
| 1523 | + | } | |
| 1524 | + | ||
| 1525 | + | func (_c *MockControlPlane_GetTLSStatus_Call) Return(tLSStatusResponse *dto.TLSStatusResponse, err error) *MockControlPlane_GetTLSStatus_Call { | |
| 1526 | + | _c.Call.Return(tLSStatusResponse, err) | |
| 1527 | + | return _c | |
| 1528 | + | } | |
| 1529 | + | ||
| 1530 | + | func (_c *MockControlPlane_GetTLSStatus_Call) RunAndReturn(run func(ctx context.Context) (*dto.TLSStatusResponse, error)) *MockControlPlane_GetTLSStatus_Call { | |
| 1531 | + | _c.Call.Return(run) | |
| 1532 | + | return _c | |
| 1533 | + | } | |
| 1534 | + | ||
| 1535 | + | // ListBackups provides a mock function for the type MockControlPlane | |
| 1536 | + | func (_mock *MockControlPlane) ListBackups(ctx context.Context, backupDomain string) ([]dto.BackupJob, error) { | |
| 1537 | + | ret := _mock.Called(ctx, backupDomain) | |
| 1538 | + | ||
| 1539 | + | if len(ret) == 0 { | |
| 1540 | + | panic("no return value specified for ListBackups") | |
| 1541 | + | } | |
| 1542 | + | ||
| 1543 | + | var r0 []dto.BackupJob | |
| 1544 | + | var r1 error | |
| 1545 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]dto.BackupJob, error)); ok { | |
| 1546 | + | return returnFunc(ctx, backupDomain) | |
| 1547 | + | } | |
| 1548 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []dto.BackupJob); ok { | |
| 1549 | + | r0 = returnFunc(ctx, backupDomain) | |
| 1550 | + | } else { | |
| 1551 | + | if ret.Get(0) != nil { | |
| 1552 | + | r0 = ret.Get(0).([]dto.BackupJob) | |
| 1553 | + | } | |
| 1554 | + | } | |
| 1555 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 1556 | + | r1 = returnFunc(ctx, backupDomain) | |
| 1557 | + | } else { | |
| 1558 | + | r1 = ret.Error(1) | |
| 1559 | + | } | |
| 1560 | + | return r0, r1 | |
| 1561 | + | } | |
| 1562 | + | ||
| 1563 | + | // MockControlPlane_ListBackups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBackups' | |
| 1564 | + | type MockControlPlane_ListBackups_Call struct { | |
| 1565 | + | *mock.Call | |
| 1566 | + | } | |
| 1567 | + | ||
| 1568 | + | // ListBackups is a helper method to define mock.On call | |
| 1569 | + | // - ctx context.Context | |
| 1570 | + | // - backupDomain string | |
| 1571 | + | func (_e *MockControlPlane_Expecter) ListBackups(ctx interface{}, backupDomain interface{}) *MockControlPlane_ListBackups_Call { | |
| 1572 | + | return &MockControlPlane_ListBackups_Call{Call: _e.mock.On("ListBackups", ctx, backupDomain)} | |
| 1573 | + | } | |
| 1574 | + | ||
| 1575 | + | func (_c *MockControlPlane_ListBackups_Call) Run(run func(ctx context.Context, backupDomain string)) *MockControlPlane_ListBackups_Call { | |
| 1576 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1577 | + | var arg0 context.Context | |
| 1578 | + | if args[0] != nil { | |
| 1579 | + | arg0 = args[0].(context.Context) | |
| 1580 | + | } | |
| 1581 | + | var arg1 string | |
| 1582 | + | if args[1] != nil { | |
| 1583 | + | arg1 = args[1].(string) | |
| 1584 | + | } | |
| 1585 | + | run( | |
| 1586 | + | arg0, | |
| 1587 | + | arg1, | |
| 1588 | + | ) | |
| 1589 | + | }) | |
| 1590 | + | return _c | |
| 1591 | + | } | |
| 1592 | + | ||
| 1593 | + | func (_c *MockControlPlane_ListBackups_Call) Return(backupJobs []dto.BackupJob, err error) *MockControlPlane_ListBackups_Call { | |
| 1594 | + | _c.Call.Return(backupJobs, err) | |
| 1595 | + | return _c | |
| 1596 | + | } | |
| 1597 | + | ||
| 1598 | + | func (_c *MockControlPlane_ListBackups_Call) RunAndReturn(run func(ctx context.Context, backupDomain string) ([]dto.BackupJob, error)) *MockControlPlane_ListBackups_Call { | |
| 1599 | + | _c.Call.Return(run) | |
| 1600 | + | return _c | |
| 1601 | + | } | |
| 1602 | + | ||
| 1603 | + | // ListNetworks provides a mock function for the type MockControlPlane | |
| 1604 | + | func (_mock *MockControlPlane) ListNetworks(ctx context.Context) ([]*domain.NetworkInfo, error) { | |
| 1605 | + | ret := _mock.Called(ctx) | |
| 1606 | + | ||
| 1607 | + | if len(ret) == 0 { | |
| 1608 | + | panic("no return value specified for ListNetworks") | |
| 1609 | + | } | |
| 1610 | + | ||
| 1611 | + | var r0 []*domain.NetworkInfo | |
| 1612 | + | var r1 error | |
| 1613 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*domain.NetworkInfo, error)); ok { | |
| 1614 | + | return returnFunc(ctx) | |
| 1615 | + | } | |
| 1616 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*domain.NetworkInfo); ok { | |
| 1617 | + | r0 = returnFunc(ctx) | |
| 1618 | + | } else { | |
| 1619 | + | if ret.Get(0) != nil { | |
| 1620 | + | r0 = ret.Get(0).([]*domain.NetworkInfo) | |
| 1621 | + | } | |
| 1622 | + | } | |
| 1623 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 1624 | + | r1 = returnFunc(ctx) | |
| 1625 | + | } else { | |
| 1626 | + | r1 = ret.Error(1) | |
| 1627 | + | } | |
| 1628 | + | return r0, r1 | |
| 1629 | + | } | |
| 1630 | + | ||
| 1631 | + | // MockControlPlane_ListNetworks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNetworks' | |
| 1632 | + | type MockControlPlane_ListNetworks_Call struct { | |
| 1633 | + | *mock.Call | |
| 1634 | + | } | |
| 1635 | + | ||
| 1636 | + | // ListNetworks is a helper method to define mock.On call | |
| 1637 | + | // - ctx context.Context | |
| 1638 | + | func (_e *MockControlPlane_Expecter) ListNetworks(ctx interface{}) *MockControlPlane_ListNetworks_Call { | |
| 1639 | + | return &MockControlPlane_ListNetworks_Call{Call: _e.mock.On("ListNetworks", ctx)} | |
| 1640 | + | } | |
| 1641 | + | ||
| 1642 | + | func (_c *MockControlPlane_ListNetworks_Call) Run(run func(ctx context.Context)) *MockControlPlane_ListNetworks_Call { | |
| 1643 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1644 | + | var arg0 context.Context | |
| 1645 | + | if args[0] != nil { | |
| 1646 | + | arg0 = args[0].(context.Context) | |
| 1647 | + | } | |
| 1648 | + | run( | |
| 1649 | + | arg0, | |
| 1650 | + | ) | |
| 1651 | + | }) | |
| 1652 | + | return _c | |
| 1653 | + | } | |
| 1654 | + | ||
| 1655 | + | func (_c *MockControlPlane_ListNetworks_Call) Return(networkInfos []*domain.NetworkInfo, err error) *MockControlPlane_ListNetworks_Call { | |
| 1656 | + | _c.Call.Return(networkInfos, err) | |
| 1657 | + | return _c | |
| 1658 | + | } | |
| 1659 | + | ||
| 1660 | + | func (_c *MockControlPlane_ListNetworks_Call) RunAndReturn(run func(ctx context.Context) ([]*domain.NetworkInfo, error)) *MockControlPlane_ListNetworks_Call { | |
| 1661 | + | _c.Call.Return(run) | |
| 1662 | + | return _c | |
| 1663 | + | } | |
| 1664 | + | ||
| 1665 | + | // ListOrphanedAttachments provides a mock function for the type MockControlPlane | |
| 1666 | + | func (_mock *MockControlPlane) ListOrphanedAttachments(ctx context.Context) ([]domain.CleanupAttachment, error) { | |
| 1667 | + | ret := _mock.Called(ctx) | |
| 1668 | + | ||
| 1669 | + | if len(ret) == 0 { | |
| 1670 | + | panic("no return value specified for ListOrphanedAttachments") | |
| 1671 | + | } | |
| 1672 | + | ||
| 1673 | + | var r0 []domain.CleanupAttachment | |
| 1674 | + | var r1 error | |
| 1675 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.CleanupAttachment, error)); ok { | |
| 1676 | + | return returnFunc(ctx) | |
| 1677 | + | } | |
| 1678 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.CleanupAttachment); ok { | |
| 1679 | + | r0 = returnFunc(ctx) | |
| 1680 | + | } else { | |
| 1681 | + | if ret.Get(0) != nil { | |
| 1682 | + | r0 = ret.Get(0).([]domain.CleanupAttachment) | |
| 1683 | + | } | |
| 1684 | + | } | |
| 1685 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 1686 | + | r1 = returnFunc(ctx) | |
| 1687 | + | } else { | |
| 1688 | + | r1 = ret.Error(1) | |
| 1689 | + | } | |
| 1690 | + | return r0, r1 | |
| 1691 | + | } | |
| 1692 | + | ||
| 1693 | + | // MockControlPlane_ListOrphanedAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListOrphanedAttachments' | |
| 1694 | + | type MockControlPlane_ListOrphanedAttachments_Call struct { | |
| 1695 | + | *mock.Call | |
| 1696 | + | } | |
| 1697 | + | ||
| 1698 | + | // ListOrphanedAttachments is a helper method to define mock.On call | |
| 1699 | + | // - ctx context.Context | |
| 1700 | + | func (_e *MockControlPlane_Expecter) ListOrphanedAttachments(ctx interface{}) *MockControlPlane_ListOrphanedAttachments_Call { | |
| 1701 | + | return &MockControlPlane_ListOrphanedAttachments_Call{Call: _e.mock.On("ListOrphanedAttachments", ctx)} | |
| 1702 | + | } | |
| 1703 | + | ||
| 1704 | + | func (_c *MockControlPlane_ListOrphanedAttachments_Call) Run(run func(ctx context.Context)) *MockControlPlane_ListOrphanedAttachments_Call { | |
| 1705 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1706 | + | var arg0 context.Context | |
| 1707 | + | if args[0] != nil { | |
| 1708 | + | arg0 = args[0].(context.Context) | |
| 1709 | + | } | |
| 1710 | + | run( | |
| 1711 | + | arg0, | |
| 1712 | + | ) | |
| 1713 | + | }) | |
| 1714 | + | return _c | |
| 1715 | + | } | |
| 1716 | + | ||
| 1717 | + | func (_c *MockControlPlane_ListOrphanedAttachments_Call) Return(cleanupAttachments []domain.CleanupAttachment, err error) *MockControlPlane_ListOrphanedAttachments_Call { | |
| 1718 | + | _c.Call.Return(cleanupAttachments, err) | |
| 1719 | + | return _c | |
| 1720 | + | } | |
| 1721 | + | ||
| 1722 | + | func (_c *MockControlPlane_ListOrphanedAttachments_Call) RunAndReturn(run func(ctx context.Context) ([]domain.CleanupAttachment, error)) *MockControlPlane_ListOrphanedAttachments_Call { | |
| 1723 | + | _c.Call.Return(run) | |
| 1724 | + | return _c | |
| 1725 | + | } | |
| 1726 | + | ||
| 1727 | + | // ListRoutesWithDetails provides a mock function for the type MockControlPlane | |
| 1728 | + | func (_mock *MockControlPlane) ListRoutesWithDetails(ctx context.Context) ([]remote.RouteInfo, error) { | |
| 1729 | + | ret := _mock.Called(ctx) | |
| 1730 | + | ||
| 1731 | + | if len(ret) == 0 { | |
| 1732 | + | panic("no return value specified for ListRoutesWithDetails") | |
| 1733 | + | } | |
| 1734 | + | ||
| 1735 | + | var r0 []remote.RouteInfo | |
| 1736 | + | var r1 error | |
| 1737 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]remote.RouteInfo, error)); ok { | |
| 1738 | + | return returnFunc(ctx) | |
| 1739 | + | } | |
| 1740 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []remote.RouteInfo); ok { | |
| 1741 | + | r0 = returnFunc(ctx) | |
| 1742 | + | } else { | |
| 1743 | + | if ret.Get(0) != nil { | |
| 1744 | + | r0 = ret.Get(0).([]remote.RouteInfo) | |
| 1745 | + | } | |
| 1746 | + | } | |
| 1747 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 1748 | + | r1 = returnFunc(ctx) | |
| 1749 | + | } else { | |
| 1750 | + | r1 = ret.Error(1) | |
| 1751 | + | } | |
| 1752 | + | return r0, r1 | |
| 1753 | + | } | |
| 1754 | + | ||
| 1755 | + | // MockControlPlane_ListRoutesWithDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRoutesWithDetails' | |
| 1756 | + | type MockControlPlane_ListRoutesWithDetails_Call struct { | |
| 1757 | + | *mock.Call | |
| 1758 | + | } | |
| 1759 | + | ||
| 1760 | + | // ListRoutesWithDetails is a helper method to define mock.On call | |
| 1761 | + | // - ctx context.Context | |
| 1762 | + | func (_e *MockControlPlane_Expecter) ListRoutesWithDetails(ctx interface{}) *MockControlPlane_ListRoutesWithDetails_Call { | |
| 1763 | + | return &MockControlPlane_ListRoutesWithDetails_Call{Call: _e.mock.On("ListRoutesWithDetails", ctx)} | |
| 1764 | + | } | |
| 1765 | + | ||
| 1766 | + | func (_c *MockControlPlane_ListRoutesWithDetails_Call) Run(run func(ctx context.Context)) *MockControlPlane_ListRoutesWithDetails_Call { | |
| 1767 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1768 | + | var arg0 context.Context | |
| 1769 | + | if args[0] != nil { | |
| 1770 | + | arg0 = args[0].(context.Context) | |
| 1771 | + | } | |
| 1772 | + | run( | |
| 1773 | + | arg0, | |
| 1774 | + | ) | |
| 1775 | + | }) | |
| 1776 | + | return _c | |
| 1777 | + | } | |
| 1778 | + | ||
| 1779 | + | func (_c *MockControlPlane_ListRoutesWithDetails_Call) Return(vs []remote.RouteInfo, err error) *MockControlPlane_ListRoutesWithDetails_Call { | |
| 1780 | + | _c.Call.Return(vs, err) | |
| 1781 | + | return _c | |
| 1782 | + | } | |
| 1783 | + | ||
| 1784 | + | func (_c *MockControlPlane_ListRoutesWithDetails_Call) RunAndReturn(run func(ctx context.Context) ([]remote.RouteInfo, error)) *MockControlPlane_ListRoutesWithDetails_Call { | |
| 1785 | + | _c.Call.Return(run) | |
| 1786 | + | return _c | |
| 1787 | + | } | |
| 1788 | + | ||
| 1789 | + | // ListSecretsWithAttachments provides a mock function for the type MockControlPlane | |
| 1790 | + | func (_mock *MockControlPlane) ListSecretsWithAttachments(ctx context.Context, secretDomain string) (*remote.SecretsListResult, error) { | |
| 1791 | + | ret := _mock.Called(ctx, secretDomain) | |
| 1792 | + | ||
| 1793 | + | if len(ret) == 0 { | |
| 1794 | + | panic("no return value specified for ListSecretsWithAttachments") | |
| 1795 | + | } | |
| 1796 | + | ||
| 1797 | + | var r0 *remote.SecretsListResult | |
| 1798 | + | var r1 error | |
| 1799 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*remote.SecretsListResult, error)); ok { | |
| 1800 | + | return returnFunc(ctx, secretDomain) | |
| 1801 | + | } | |
| 1802 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *remote.SecretsListResult); ok { | |
| 1803 | + | r0 = returnFunc(ctx, secretDomain) | |
| 1804 | + | } else { | |
| 1805 | + | if ret.Get(0) != nil { | |
| 1806 | + | r0 = ret.Get(0).(*remote.SecretsListResult) | |
| 1807 | + | } | |
| 1808 | + | } | |
| 1809 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 1810 | + | r1 = returnFunc(ctx, secretDomain) | |
| 1811 | + | } else { | |
| 1812 | + | r1 = ret.Error(1) | |
| 1813 | + | } | |
| 1814 | + | return r0, r1 | |
| 1815 | + | } | |
| 1816 | + | ||
| 1817 | + | // MockControlPlane_ListSecretsWithAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSecretsWithAttachments' | |
| 1818 | + | type MockControlPlane_ListSecretsWithAttachments_Call struct { | |
| 1819 | + | *mock.Call | |
| 1820 | + | } | |
| 1821 | + | ||
| 1822 | + | // ListSecretsWithAttachments is a helper method to define mock.On call | |
| 1823 | + | // - ctx context.Context | |
| 1824 | + | // - secretDomain string | |
| 1825 | + | func (_e *MockControlPlane_Expecter) ListSecretsWithAttachments(ctx interface{}, secretDomain interface{}) *MockControlPlane_ListSecretsWithAttachments_Call { | |
| 1826 | + | return &MockControlPlane_ListSecretsWithAttachments_Call{Call: _e.mock.On("ListSecretsWithAttachments", ctx, secretDomain)} | |
| 1827 | + | } | |
| 1828 | + | ||
| 1829 | + | func (_c *MockControlPlane_ListSecretsWithAttachments_Call) Run(run func(ctx context.Context, secretDomain string)) *MockControlPlane_ListSecretsWithAttachments_Call { | |
| 1830 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1831 | + | var arg0 context.Context | |
| 1832 | + | if args[0] != nil { | |
| 1833 | + | arg0 = args[0].(context.Context) | |
| 1834 | + | } | |
| 1835 | + | var arg1 string | |
| 1836 | + | if args[1] != nil { | |
| 1837 | + | arg1 = args[1].(string) | |
| 1838 | + | } | |
| 1839 | + | run( | |
| 1840 | + | arg0, | |
| 1841 | + | arg1, | |
| 1842 | + | ) | |
| 1843 | + | }) | |
| 1844 | + | return _c | |
| 1845 | + | } | |
| 1846 | + | ||
| 1847 | + | func (_c *MockControlPlane_ListSecretsWithAttachments_Call) Return(secretsListResult *remote.SecretsListResult, err error) *MockControlPlane_ListSecretsWithAttachments_Call { | |
| 1848 | + | _c.Call.Return(secretsListResult, err) | |
| 1849 | + | return _c | |
| 1850 | + | } | |
| 1851 | + | ||
| 1852 | + | func (_c *MockControlPlane_ListSecretsWithAttachments_Call) RunAndReturn(run func(ctx context.Context, secretDomain string) (*remote.SecretsListResult, error)) *MockControlPlane_ListSecretsWithAttachments_Call { | |
| 1853 | + | _c.Call.Return(run) | |
| 1854 | + | return _c | |
| 1855 | + | } | |
| 1856 | + | ||
| 1857 | + | // ListTags provides a mock function for the type MockControlPlane | |
| 1858 | + | func (_mock *MockControlPlane) ListTags(ctx context.Context, repository string) ([]string, error) { | |
| 1859 | + | ret := _mock.Called(ctx, repository) | |
| 1860 | + | ||
| 1861 | + | if len(ret) == 0 { | |
| 1862 | + | panic("no return value specified for ListTags") | |
| 1863 | + | } | |
| 1864 | + | ||
| 1865 | + | var r0 []string | |
| 1866 | + | var r1 error | |
| 1867 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { | |
| 1868 | + | return returnFunc(ctx, repository) | |
| 1869 | + | } | |
| 1870 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok { | |
| 1871 | + | r0 = returnFunc(ctx, repository) | |
| 1872 | + | } else { | |
| 1873 | + | if ret.Get(0) != nil { | |
| 1874 | + | r0 = ret.Get(0).([]string) | |
| 1875 | + | } | |
| 1876 | + | } | |
| 1877 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 1878 | + | r1 = returnFunc(ctx, repository) | |
| 1879 | + | } else { | |
| 1880 | + | r1 = ret.Error(1) | |
| 1881 | + | } | |
| 1882 | + | return r0, r1 | |
| 1883 | + | } | |
| 1884 | + | ||
| 1885 | + | // MockControlPlane_ListTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListTags' | |
| 1886 | + | type MockControlPlane_ListTags_Call struct { | |
| 1887 | + | *mock.Call | |
| 1888 | + | } | |
| 1889 | + | ||
| 1890 | + | // ListTags is a helper method to define mock.On call | |
| 1891 | + | // - ctx context.Context | |
| 1892 | + | // - repository string | |
| 1893 | + | func (_e *MockControlPlane_Expecter) ListTags(ctx interface{}, repository interface{}) *MockControlPlane_ListTags_Call { | |
| 1894 | + | return &MockControlPlane_ListTags_Call{Call: _e.mock.On("ListTags", ctx, repository)} | |
| 1895 | + | } | |
| 1896 | + | ||
| 1897 | + | func (_c *MockControlPlane_ListTags_Call) Run(run func(ctx context.Context, repository string)) *MockControlPlane_ListTags_Call { | |
| 1898 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1899 | + | var arg0 context.Context | |
| 1900 | + | if args[0] != nil { | |
| 1901 | + | arg0 = args[0].(context.Context) | |
| 1902 | + | } | |
| 1903 | + | var arg1 string | |
| 1904 | + | if args[1] != nil { | |
| 1905 | + | arg1 = args[1].(string) | |
| 1906 | + | } | |
| 1907 | + | run( | |
| 1908 | + | arg0, | |
| 1909 | + | arg1, | |
| 1910 | + | ) | |
| 1911 | + | }) | |
| 1912 | + | return _c | |
| 1913 | + | } | |
| 1914 | + | ||
| 1915 | + | func (_c *MockControlPlane_ListTags_Call) Return(strings []string, err error) *MockControlPlane_ListTags_Call { | |
| 1916 | + | _c.Call.Return(strings, err) | |
| 1917 | + | return _c | |
| 1918 | + | } | |
| 1919 | + | ||
| 1920 | + | func (_c *MockControlPlane_ListTags_Call) RunAndReturn(run func(ctx context.Context, repository string) ([]string, error)) *MockControlPlane_ListTags_Call { | |
| 1921 | + | _c.Call.Return(run) | |
| 1922 | + | return _c | |
| 1923 | + | } | |
| 1924 | + | ||
| 1925 | + | // ListVolumes provides a mock function for the type MockControlPlane | |
| 1926 | + | func (_mock *MockControlPlane) ListVolumes(ctx context.Context) ([]dto.Volume, error) { | |
| 1927 | + | ret := _mock.Called(ctx) | |
| 1928 | + | ||
| 1929 | + | if len(ret) == 0 { | |
| 1930 | + | panic("no return value specified for ListVolumes") | |
| 1931 | + | } | |
| 1932 | + | ||
| 1933 | + | var r0 []dto.Volume | |
| 1934 | + | var r1 error | |
| 1935 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]dto.Volume, error)); ok { | |
| 1936 | + | return returnFunc(ctx) | |
| 1937 | + | } | |
| 1938 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []dto.Volume); ok { | |
| 1939 | + | r0 = returnFunc(ctx) | |
| 1940 | + | } else { | |
| 1941 | + | if ret.Get(0) != nil { | |
| 1942 | + | r0 = ret.Get(0).([]dto.Volume) | |
| 1943 | + | } | |
| 1944 | + | } | |
| 1945 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 1946 | + | r1 = returnFunc(ctx) | |
| 1947 | + | } else { | |
| 1948 | + | r1 = ret.Error(1) | |
| 1949 | + | } | |
| 1950 | + | return r0, r1 | |
| 1951 | + | } | |
| 1952 | + | ||
| 1953 | + | // MockControlPlane_ListVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVolumes' | |
| 1954 | + | type MockControlPlane_ListVolumes_Call struct { | |
| 1955 | + | *mock.Call | |
| 1956 | + | } | |
| 1957 | + | ||
| 1958 | + | // ListVolumes is a helper method to define mock.On call | |
| 1959 | + | // - ctx context.Context | |
| 1960 | + | func (_e *MockControlPlane_Expecter) ListVolumes(ctx interface{}) *MockControlPlane_ListVolumes_Call { | |
| 1961 | + | return &MockControlPlane_ListVolumes_Call{Call: _e.mock.On("ListVolumes", ctx)} | |
| 1962 | + | } | |
| 1963 | + | ||
| 1964 | + | func (_c *MockControlPlane_ListVolumes_Call) Run(run func(ctx context.Context)) *MockControlPlane_ListVolumes_Call { | |
| 1965 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 1966 | + | var arg0 context.Context | |
| 1967 | + | if args[0] != nil { | |
| 1968 | + | arg0 = args[0].(context.Context) | |
| 1969 | + | } | |
| 1970 | + | run( | |
| 1971 | + | arg0, | |
| 1972 | + | ) | |
| 1973 | + | }) | |
| 1974 | + | return _c | |
| 1975 | + | } | |
| 1976 | + | ||
| 1977 | + | func (_c *MockControlPlane_ListVolumes_Call) Return(volumes []dto.Volume, err error) *MockControlPlane_ListVolumes_Call { | |
| 1978 | + | _c.Call.Return(volumes, err) | |
| 1979 | + | return _c | |
| 1980 | + | } | |
| 1981 | + | ||
| 1982 | + | func (_c *MockControlPlane_ListVolumes_Call) RunAndReturn(run func(ctx context.Context) ([]dto.Volume, error)) *MockControlPlane_ListVolumes_Call { | |
| 1983 | + | _c.Call.Return(run) | |
| 1984 | + | return _c | |
| 1985 | + | } | |
| 1986 | + | ||
| 1987 | + | // PruneVolumes provides a mock function for the type MockControlPlane | |
| 1988 | + | func (_mock *MockControlPlane) PruneVolumes(ctx context.Context, req dto.VolumePruneRequest) (*dto.VolumePruneResponse, error) { | |
| 1989 | + | ret := _mock.Called(ctx, req) | |
| 1990 | + | ||
| 1991 | + | if len(ret) == 0 { | |
| 1992 | + | panic("no return value specified for PruneVolumes") | |
| 1993 | + | } | |
| 1994 | + | ||
| 1995 | + | var r0 *dto.VolumePruneResponse | |
| 1996 | + | var r1 error | |
| 1997 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.VolumePruneRequest) (*dto.VolumePruneResponse, error)); ok { | |
| 1998 | + | return returnFunc(ctx, req) | |
| 1999 | + | } | |
| 2000 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.VolumePruneRequest) *dto.VolumePruneResponse); ok { | |
| 2001 | + | r0 = returnFunc(ctx, req) | |
| 2002 | + | } else { | |
| 2003 | + | if ret.Get(0) != nil { | |
| 2004 | + | r0 = ret.Get(0).(*dto.VolumePruneResponse) | |
| 2005 | + | } | |
| 2006 | + | } | |
| 2007 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, dto.VolumePruneRequest) error); ok { | |
| 2008 | + | r1 = returnFunc(ctx, req) | |
| 2009 | + | } else { | |
| 2010 | + | r1 = ret.Error(1) | |
| 2011 | + | } | |
| 2012 | + | return r0, r1 | |
| 2013 | + | } | |
| 2014 | + | ||
| 2015 | + | // MockControlPlane_PruneVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneVolumes' | |
| 2016 | + | type MockControlPlane_PruneVolumes_Call struct { | |
| 2017 | + | *mock.Call | |
| 2018 | + | } | |
| 2019 | + | ||
| 2020 | + | // PruneVolumes is a helper method to define mock.On call | |
| 2021 | + | // - ctx context.Context | |
| 2022 | + | // - req dto.VolumePruneRequest | |
| 2023 | + | func (_e *MockControlPlane_Expecter) PruneVolumes(ctx interface{}, req interface{}) *MockControlPlane_PruneVolumes_Call { | |
| 2024 | + | return &MockControlPlane_PruneVolumes_Call{Call: _e.mock.On("PruneVolumes", ctx, req)} | |
| 2025 | + | } | |
| 2026 | + | ||
| 2027 | + | func (_c *MockControlPlane_PruneVolumes_Call) Run(run func(ctx context.Context, req dto.VolumePruneRequest)) *MockControlPlane_PruneVolumes_Call { | |
| 2028 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2029 | + | var arg0 context.Context | |
| 2030 | + | if args[0] != nil { | |
| 2031 | + | arg0 = args[0].(context.Context) | |
| 2032 | + | } | |
| 2033 | + | var arg1 dto.VolumePruneRequest | |
| 2034 | + | if args[1] != nil { | |
| 2035 | + | arg1 = args[1].(dto.VolumePruneRequest) | |
| 2036 | + | } | |
| 2037 | + | run( | |
| 2038 | + | arg0, | |
| 2039 | + | arg1, | |
| 2040 | + | ) | |
| 2041 | + | }) | |
| 2042 | + | return _c | |
| 2043 | + | } | |
| 2044 | + | ||
| 2045 | + | func (_c *MockControlPlane_PruneVolumes_Call) Return(volumePruneResponse *dto.VolumePruneResponse, err error) *MockControlPlane_PruneVolumes_Call { | |
| 2046 | + | _c.Call.Return(volumePruneResponse, err) | |
| 2047 | + | return _c | |
| 2048 | + | } | |
| 2049 | + | ||
| 2050 | + | func (_c *MockControlPlane_PruneVolumes_Call) RunAndReturn(run func(ctx context.Context, req dto.VolumePruneRequest) (*dto.VolumePruneResponse, error)) *MockControlPlane_PruneVolumes_Call { | |
| 2051 | + | _c.Call.Return(run) | |
| 2052 | + | return _c | |
| 2053 | + | } | |
| 2054 | + | ||
| 2055 | + | // Reload provides a mock function for the type MockControlPlane | |
| 2056 | + | func (_mock *MockControlPlane) Reload(ctx context.Context) error { | |
| 2057 | + | ret := _mock.Called(ctx) | |
| 2058 | + | ||
| 2059 | + | if len(ret) == 0 { | |
| 2060 | + | panic("no return value specified for Reload") | |
| 2061 | + | } | |
| 2062 | + | ||
| 2063 | + | var r0 error | |
| 2064 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 2065 | + | r0 = returnFunc(ctx) | |
| 2066 | + | } else { | |
| 2067 | + | r0 = ret.Error(0) | |
| 2068 | + | } | |
| 2069 | + | return r0 | |
| 2070 | + | } | |
| 2071 | + | ||
| 2072 | + | // MockControlPlane_Reload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reload' | |
| 2073 | + | type MockControlPlane_Reload_Call struct { | |
| 2074 | + | *mock.Call | |
| 2075 | + | } | |
| 2076 | + | ||
| 2077 | + | // Reload is a helper method to define mock.On call | |
| 2078 | + | // - ctx context.Context | |
| 2079 | + | func (_e *MockControlPlane_Expecter) Reload(ctx interface{}) *MockControlPlane_Reload_Call { | |
| 2080 | + | return &MockControlPlane_Reload_Call{Call: _e.mock.On("Reload", ctx)} | |
| 2081 | + | } | |
| 2082 | + | ||
| 2083 | + | func (_c *MockControlPlane_Reload_Call) Run(run func(ctx context.Context)) *MockControlPlane_Reload_Call { | |
| 2084 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2085 | + | var arg0 context.Context | |
| 2086 | + | if args[0] != nil { | |
| 2087 | + | arg0 = args[0].(context.Context) | |
| 2088 | + | } | |
| 2089 | + | run( | |
| 2090 | + | arg0, | |
| 2091 | + | ) | |
| 2092 | + | }) | |
| 2093 | + | return _c | |
| 2094 | + | } | |
| 2095 | + | ||
| 2096 | + | func (_c *MockControlPlane_Reload_Call) Return(err error) *MockControlPlane_Reload_Call { | |
| 2097 | + | _c.Call.Return(err) | |
| 2098 | + | return _c | |
| 2099 | + | } | |
| 2100 | + | ||
| 2101 | + | func (_c *MockControlPlane_Reload_Call) RunAndReturn(run func(ctx context.Context) error) *MockControlPlane_Reload_Call { | |
| 2102 | + | _c.Call.Return(run) | |
| 2103 | + | return _c | |
| 2104 | + | } | |
| 2105 | + | ||
| 2106 | + | // RemoveAttachment provides a mock function for the type MockControlPlane | |
| 2107 | + | func (_mock *MockControlPlane) RemoveAttachment(ctx context.Context, domainOrGroup string, image string) error { | |
| 2108 | + | ret := _mock.Called(ctx, domainOrGroup, image) | |
| 2109 | + | ||
| 2110 | + | if len(ret) == 0 { | |
| 2111 | + | panic("no return value specified for RemoveAttachment") | |
| 2112 | + | } | |
| 2113 | + | ||
| 2114 | + | var r0 error | |
| 2115 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { | |
| 2116 | + | r0 = returnFunc(ctx, domainOrGroup, image) | |
| 2117 | + | } else { | |
| 2118 | + | r0 = ret.Error(0) | |
| 2119 | + | } | |
| 2120 | + | return r0 | |
| 2121 | + | } | |
| 2122 | + | ||
| 2123 | + | // MockControlPlane_RemoveAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAttachment' | |
| 2124 | + | type MockControlPlane_RemoveAttachment_Call struct { | |
| 2125 | + | *mock.Call | |
| 2126 | + | } | |
| 2127 | + | ||
| 2128 | + | // RemoveAttachment is a helper method to define mock.On call | |
| 2129 | + | // - ctx context.Context | |
| 2130 | + | // - domainOrGroup string | |
| 2131 | + | // - image string | |
| 2132 | + | func (_e *MockControlPlane_Expecter) RemoveAttachment(ctx interface{}, domainOrGroup interface{}, image interface{}) *MockControlPlane_RemoveAttachment_Call { | |
| 2133 | + | return &MockControlPlane_RemoveAttachment_Call{Call: _e.mock.On("RemoveAttachment", ctx, domainOrGroup, image)} | |
| 2134 | + | } | |
| 2135 | + | ||
| 2136 | + | func (_c *MockControlPlane_RemoveAttachment_Call) Run(run func(ctx context.Context, domainOrGroup string, image string)) *MockControlPlane_RemoveAttachment_Call { | |
| 2137 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2138 | + | var arg0 context.Context | |
| 2139 | + | if args[0] != nil { | |
| 2140 | + | arg0 = args[0].(context.Context) | |
| 2141 | + | } | |
| 2142 | + | var arg1 string | |
| 2143 | + | if args[1] != nil { | |
| 2144 | + | arg1 = args[1].(string) | |
| 2145 | + | } | |
| 2146 | + | var arg2 string | |
| 2147 | + | if args[2] != nil { | |
| 2148 | + | arg2 = args[2].(string) | |
| 2149 | + | } | |
| 2150 | + | run( | |
| 2151 | + | arg0, | |
| 2152 | + | arg1, | |
| 2153 | + | arg2, | |
| 2154 | + | ) | |
| 2155 | + | }) | |
| 2156 | + | return _c | |
| 2157 | + | } | |
| 2158 | + | ||
| 2159 | + | func (_c *MockControlPlane_RemoveAttachment_Call) Return(err error) *MockControlPlane_RemoveAttachment_Call { | |
| 2160 | + | _c.Call.Return(err) | |
| 2161 | + | return _c | |
| 2162 | + | } | |
| 2163 | + | ||
| 2164 | + | func (_c *MockControlPlane_RemoveAttachment_Call) RunAndReturn(run func(ctx context.Context, domainOrGroup string, image string) error) *MockControlPlane_RemoveAttachment_Call { | |
| 2165 | + | _c.Call.Return(run) | |
| 2166 | + | return _c | |
| 2167 | + | } | |
| 2168 | + | ||
| 2169 | + | // RemoveAutoRouteAllowedDomain provides a mock function for the type MockControlPlane | |
| 2170 | + | func (_mock *MockControlPlane) RemoveAutoRouteAllowedDomain(ctx context.Context, pattern string) error { | |
| 2171 | + | ret := _mock.Called(ctx, pattern) | |
| 2172 | + | ||
| 2173 | + | if len(ret) == 0 { | |
| 2174 | + | panic("no return value specified for RemoveAutoRouteAllowedDomain") | |
| 2175 | + | } | |
| 2176 | + | ||
| 2177 | + | var r0 error | |
| 2178 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 2179 | + | r0 = returnFunc(ctx, pattern) | |
| 2180 | + | } else { | |
| 2181 | + | r0 = ret.Error(0) | |
| 2182 | + | } | |
| 2183 | + | return r0 | |
| 2184 | + | } | |
| 2185 | + | ||
| 2186 | + | // MockControlPlane_RemoveAutoRouteAllowedDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAutoRouteAllowedDomain' | |
| 2187 | + | type MockControlPlane_RemoveAutoRouteAllowedDomain_Call struct { | |
| 2188 | + | *mock.Call | |
| 2189 | + | } | |
| 2190 | + | ||
| 2191 | + | // RemoveAutoRouteAllowedDomain is a helper method to define mock.On call | |
| 2192 | + | // - ctx context.Context | |
| 2193 | + | // - pattern string | |
| 2194 | + | func (_e *MockControlPlane_Expecter) RemoveAutoRouteAllowedDomain(ctx interface{}, pattern interface{}) *MockControlPlane_RemoveAutoRouteAllowedDomain_Call { | |
| 2195 | + | return &MockControlPlane_RemoveAutoRouteAllowedDomain_Call{Call: _e.mock.On("RemoveAutoRouteAllowedDomain", ctx, pattern)} | |
| 2196 | + | } | |
| 2197 | + | ||
| 2198 | + | func (_c *MockControlPlane_RemoveAutoRouteAllowedDomain_Call) Run(run func(ctx context.Context, pattern string)) *MockControlPlane_RemoveAutoRouteAllowedDomain_Call { | |
| 2199 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2200 | + | var arg0 context.Context | |
| 2201 | + | if args[0] != nil { | |
| 2202 | + | arg0 = args[0].(context.Context) | |
| 2203 | + | } | |
| 2204 | + | var arg1 string | |
| 2205 | + | if args[1] != nil { | |
| 2206 | + | arg1 = args[1].(string) | |
| 2207 | + | } | |
| 2208 | + | run( | |
| 2209 | + | arg0, | |
| 2210 | + | arg1, | |
| 2211 | + | ) | |
| 2212 | + | }) | |
| 2213 | + | return _c | |
| 2214 | + | } | |
| 2215 | + | ||
| 2216 | + | func (_c *MockControlPlane_RemoveAutoRouteAllowedDomain_Call) Return(err error) *MockControlPlane_RemoveAutoRouteAllowedDomain_Call { | |
| 2217 | + | _c.Call.Return(err) | |
| 2218 | + | return _c | |
| 2219 | + | } | |
| 2220 | + | ||
| 2221 | + | func (_c *MockControlPlane_RemoveAutoRouteAllowedDomain_Call) RunAndReturn(run func(ctx context.Context, pattern string) error) *MockControlPlane_RemoveAutoRouteAllowedDomain_Call { | |
| 2222 | + | _c.Call.Return(run) | |
| 2223 | + | return _c | |
| 2224 | + | } | |
| 2225 | + | ||
| 2226 | + | // RemoveRoute provides a mock function for the type MockControlPlane | |
| 2227 | + | func (_mock *MockControlPlane) RemoveRoute(ctx context.Context, routeDomain string) error { | |
| 2228 | + | ret := _mock.Called(ctx, routeDomain) | |
| 2229 | + | ||
| 2230 | + | if len(ret) == 0 { | |
| 2231 | + | panic("no return value specified for RemoveRoute") | |
| 2232 | + | } | |
| 2233 | + | ||
| 2234 | + | var r0 error | |
| 2235 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 2236 | + | r0 = returnFunc(ctx, routeDomain) | |
| 2237 | + | } else { | |
| 2238 | + | r0 = ret.Error(0) | |
| 2239 | + | } | |
| 2240 | + | return r0 | |
| 2241 | + | } | |
| 2242 | + | ||
| 2243 | + | // MockControlPlane_RemoveRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRoute' | |
| 2244 | + | type MockControlPlane_RemoveRoute_Call struct { | |
| 2245 | + | *mock.Call | |
| 2246 | + | } | |
| 2247 | + | ||
| 2248 | + | // RemoveRoute is a helper method to define mock.On call | |
| 2249 | + | // - ctx context.Context | |
| 2250 | + | // - routeDomain string | |
| 2251 | + | func (_e *MockControlPlane_Expecter) RemoveRoute(ctx interface{}, routeDomain interface{}) *MockControlPlane_RemoveRoute_Call { | |
| 2252 | + | return &MockControlPlane_RemoveRoute_Call{Call: _e.mock.On("RemoveRoute", ctx, routeDomain)} | |
| 2253 | + | } | |
| 2254 | + | ||
| 2255 | + | func (_c *MockControlPlane_RemoveRoute_Call) Run(run func(ctx context.Context, routeDomain string)) *MockControlPlane_RemoveRoute_Call { | |
| 2256 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2257 | + | var arg0 context.Context | |
| 2258 | + | if args[0] != nil { | |
| 2259 | + | arg0 = args[0].(context.Context) | |
| 2260 | + | } | |
| 2261 | + | var arg1 string | |
| 2262 | + | if args[1] != nil { | |
| 2263 | + | arg1 = args[1].(string) | |
| 2264 | + | } | |
| 2265 | + | run( | |
| 2266 | + | arg0, | |
| 2267 | + | arg1, | |
| 2268 | + | ) | |
| 2269 | + | }) | |
| 2270 | + | return _c | |
| 2271 | + | } | |
| 2272 | + | ||
| 2273 | + | func (_c *MockControlPlane_RemoveRoute_Call) Return(err error) *MockControlPlane_RemoveRoute_Call { | |
| 2274 | + | _c.Call.Return(err) | |
| 2275 | + | return _c | |
| 2276 | + | } | |
| 2277 | + | ||
| 2278 | + | func (_c *MockControlPlane_RemoveRoute_Call) RunAndReturn(run func(ctx context.Context, routeDomain string) error) *MockControlPlane_RemoveRoute_Call { | |
| 2279 | + | _c.Call.Return(run) | |
| 2280 | + | return _c | |
| 2281 | + | } | |
| 2282 | + | ||
| 2283 | + | // Restart provides a mock function for the type MockControlPlane | |
| 2284 | + | func (_mock *MockControlPlane) Restart(ctx context.Context, restartDomain string, withAttachments bool) (*remote.RestartResult, error) { | |
| 2285 | + | ret := _mock.Called(ctx, restartDomain, withAttachments) | |
| 2286 | + | ||
| 2287 | + | if len(ret) == 0 { | |
| 2288 | + | panic("no return value specified for Restart") | |
| 2289 | + | } | |
| 2290 | + | ||
| 2291 | + | var r0 *remote.RestartResult | |
| 2292 | + | var r1 error | |
| 2293 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) (*remote.RestartResult, error)); ok { | |
| 2294 | + | return returnFunc(ctx, restartDomain, withAttachments) | |
| 2295 | + | } | |
| 2296 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) *remote.RestartResult); ok { | |
| 2297 | + | r0 = returnFunc(ctx, restartDomain, withAttachments) | |
| 2298 | + | } else { | |
| 2299 | + | if ret.Get(0) != nil { | |
| 2300 | + | r0 = ret.Get(0).(*remote.RestartResult) | |
| 2301 | + | } | |
| 2302 | + | } | |
| 2303 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { | |
| 2304 | + | r1 = returnFunc(ctx, restartDomain, withAttachments) | |
| 2305 | + | } else { | |
| 2306 | + | r1 = ret.Error(1) | |
| 2307 | + | } | |
| 2308 | + | return r0, r1 | |
| 2309 | + | } | |
| 2310 | + | ||
| 2311 | + | // MockControlPlane_Restart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restart' | |
| 2312 | + | type MockControlPlane_Restart_Call struct { | |
| 2313 | + | *mock.Call | |
| 2314 | + | } | |
| 2315 | + | ||
| 2316 | + | // Restart is a helper method to define mock.On call | |
| 2317 | + | // - ctx context.Context | |
| 2318 | + | // - restartDomain string | |
| 2319 | + | // - withAttachments bool | |
| 2320 | + | func (_e *MockControlPlane_Expecter) Restart(ctx interface{}, restartDomain interface{}, withAttachments interface{}) *MockControlPlane_Restart_Call { | |
| 2321 | + | return &MockControlPlane_Restart_Call{Call: _e.mock.On("Restart", ctx, restartDomain, withAttachments)} | |
| 2322 | + | } | |
| 2323 | + | ||
| 2324 | + | func (_c *MockControlPlane_Restart_Call) Run(run func(ctx context.Context, restartDomain string, withAttachments bool)) *MockControlPlane_Restart_Call { | |
| 2325 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2326 | + | var arg0 context.Context | |
| 2327 | + | if args[0] != nil { | |
| 2328 | + | arg0 = args[0].(context.Context) | |
| 2329 | + | } | |
| 2330 | + | var arg1 string | |
| 2331 | + | if args[1] != nil { | |
| 2332 | + | arg1 = args[1].(string) | |
| 2333 | + | } | |
| 2334 | + | var arg2 bool | |
| 2335 | + | if args[2] != nil { | |
| 2336 | + | arg2 = args[2].(bool) | |
| 2337 | + | } | |
| 2338 | + | run( | |
| 2339 | + | arg0, | |
| 2340 | + | arg1, | |
| 2341 | + | arg2, | |
| 2342 | + | ) | |
| 2343 | + | }) | |
| 2344 | + | return _c | |
| 2345 | + | } | |
| 2346 | + | ||
| 2347 | + | func (_c *MockControlPlane_Restart_Call) Return(restartResult *remote.RestartResult, err error) *MockControlPlane_Restart_Call { | |
| 2348 | + | _c.Call.Return(restartResult, err) | |
| 2349 | + | return _c | |
| 2350 | + | } | |
| 2351 | + | ||
| 2352 | + | func (_c *MockControlPlane_Restart_Call) RunAndReturn(run func(ctx context.Context, restartDomain string, withAttachments bool) (*remote.RestartResult, error)) *MockControlPlane_Restart_Call { | |
| 2353 | + | _c.Call.Return(run) | |
| 2354 | + | return _c | |
| 2355 | + | } | |
| 2356 | + | ||
| 2357 | + | // RunBackup provides a mock function for the type MockControlPlane | |
| 2358 | + | func (_mock *MockControlPlane) RunBackup(ctx context.Context, backupDomain string, dbName string) (*dto.BackupRunResponse, error) { | |
| 2359 | + | ret := _mock.Called(ctx, backupDomain, dbName) | |
| 2360 | + | ||
| 2361 | + | if len(ret) == 0 { | |
| 2362 | + | panic("no return value specified for RunBackup") | |
| 2363 | + | } | |
| 2364 | + | ||
| 2365 | + | var r0 *dto.BackupRunResponse | |
| 2366 | + | var r1 error | |
| 2367 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*dto.BackupRunResponse, error)); ok { | |
| 2368 | + | return returnFunc(ctx, backupDomain, dbName) | |
| 2369 | + | } | |
| 2370 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *dto.BackupRunResponse); ok { | |
| 2371 | + | r0 = returnFunc(ctx, backupDomain, dbName) | |
| 2372 | + | } else { | |
| 2373 | + | if ret.Get(0) != nil { | |
| 2374 | + | r0 = ret.Get(0).(*dto.BackupRunResponse) | |
| 2375 | + | } | |
| 2376 | + | } | |
| 2377 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { | |
| 2378 | + | r1 = returnFunc(ctx, backupDomain, dbName) | |
| 2379 | + | } else { | |
| 2380 | + | r1 = ret.Error(1) | |
| 2381 | + | } | |
| 2382 | + | return r0, r1 | |
| 2383 | + | } | |
| 2384 | + | ||
| 2385 | + | // MockControlPlane_RunBackup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunBackup' | |
| 2386 | + | type MockControlPlane_RunBackup_Call struct { | |
| 2387 | + | *mock.Call | |
| 2388 | + | } | |
| 2389 | + | ||
| 2390 | + | // RunBackup is a helper method to define mock.On call | |
| 2391 | + | // - ctx context.Context | |
| 2392 | + | // - backupDomain string | |
| 2393 | + | // - dbName string | |
| 2394 | + | func (_e *MockControlPlane_Expecter) RunBackup(ctx interface{}, backupDomain interface{}, dbName interface{}) *MockControlPlane_RunBackup_Call { | |
| 2395 | + | return &MockControlPlane_RunBackup_Call{Call: _e.mock.On("RunBackup", ctx, backupDomain, dbName)} | |
| 2396 | + | } | |
| 2397 | + | ||
| 2398 | + | func (_c *MockControlPlane_RunBackup_Call) Run(run func(ctx context.Context, backupDomain string, dbName string)) *MockControlPlane_RunBackup_Call { | |
| 2399 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2400 | + | var arg0 context.Context | |
| 2401 | + | if args[0] != nil { | |
| 2402 | + | arg0 = args[0].(context.Context) | |
| 2403 | + | } | |
| 2404 | + | var arg1 string | |
| 2405 | + | if args[1] != nil { | |
| 2406 | + | arg1 = args[1].(string) | |
| 2407 | + | } | |
| 2408 | + | var arg2 string | |
| 2409 | + | if args[2] != nil { | |
| 2410 | + | arg2 = args[2].(string) | |
| 2411 | + | } | |
| 2412 | + | run( | |
| 2413 | + | arg0, | |
| 2414 | + | arg1, | |
| 2415 | + | arg2, | |
| 2416 | + | ) | |
| 2417 | + | }) | |
| 2418 | + | return _c | |
| 2419 | + | } | |
| 2420 | + | ||
| 2421 | + | func (_c *MockControlPlane_RunBackup_Call) Return(backupRunResponse *dto.BackupRunResponse, err error) *MockControlPlane_RunBackup_Call { | |
| 2422 | + | _c.Call.Return(backupRunResponse, err) | |
| 2423 | + | return _c | |
| 2424 | + | } | |
| 2425 | + | ||
| 2426 | + | func (_c *MockControlPlane_RunBackup_Call) RunAndReturn(run func(ctx context.Context, backupDomain string, dbName string) (*dto.BackupRunResponse, error)) *MockControlPlane_RunBackup_Call { | |
| 2427 | + | _c.Call.Return(run) | |
| 2428 | + | return _c | |
| 2429 | + | } | |
| 2430 | + | ||
| 2431 | + | // SetAttachmentSecrets provides a mock function for the type MockControlPlane | |
| 2432 | + | func (_mock *MockControlPlane) SetAttachmentSecrets(ctx context.Context, domain1 string, service string, secrets map[string]string) error { | |
| 2433 | + | ret := _mock.Called(ctx, domain1, service, secrets) | |
| 2434 | + | ||
| 2435 | + | if len(ret) == 0 { | |
| 2436 | + | panic("no return value specified for SetAttachmentSecrets") | |
| 2437 | + | } | |
| 2438 | + | ||
| 2439 | + | var r0 error | |
| 2440 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, map[string]string) error); ok { | |
| 2441 | + | r0 = returnFunc(ctx, domain1, service, secrets) | |
| 2442 | + | } else { | |
| 2443 | + | r0 = ret.Error(0) | |
| 2444 | + | } | |
| 2445 | + | return r0 | |
| 2446 | + | } | |
| 2447 | + | ||
| 2448 | + | // MockControlPlane_SetAttachmentSecrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAttachmentSecrets' | |
| 2449 | + | type MockControlPlane_SetAttachmentSecrets_Call struct { | |
| 2450 | + | *mock.Call | |
| 2451 | + | } | |
| 2452 | + | ||
| 2453 | + | // SetAttachmentSecrets is a helper method to define mock.On call | |
| 2454 | + | // - ctx context.Context | |
| 2455 | + | // - domain1 string | |
| 2456 | + | // - service string | |
| 2457 | + | // - secrets map[string]string | |
| 2458 | + | func (_e *MockControlPlane_Expecter) SetAttachmentSecrets(ctx interface{}, domain1 interface{}, service interface{}, secrets interface{}) *MockControlPlane_SetAttachmentSecrets_Call { | |
| 2459 | + | return &MockControlPlane_SetAttachmentSecrets_Call{Call: _e.mock.On("SetAttachmentSecrets", ctx, domain1, service, secrets)} | |
| 2460 | + | } | |
| 2461 | + | ||
| 2462 | + | func (_c *MockControlPlane_SetAttachmentSecrets_Call) Run(run func(ctx context.Context, domain1 string, service string, secrets map[string]string)) *MockControlPlane_SetAttachmentSecrets_Call { | |
| 2463 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2464 | + | var arg0 context.Context | |
| 2465 | + | if args[0] != nil { | |
| 2466 | + | arg0 = args[0].(context.Context) | |
| 2467 | + | } | |
| 2468 | + | var arg1 string | |
| 2469 | + | if args[1] != nil { | |
| 2470 | + | arg1 = args[1].(string) | |
| 2471 | + | } | |
| 2472 | + | var arg2 string | |
| 2473 | + | if args[2] != nil { | |
| 2474 | + | arg2 = args[2].(string) | |
| 2475 | + | } | |
| 2476 | + | var arg3 map[string]string | |
| 2477 | + | if args[3] != nil { | |
| 2478 | + | arg3 = args[3].(map[string]string) | |
| 2479 | + | } | |
| 2480 | + | run( | |
| 2481 | + | arg0, | |
| 2482 | + | arg1, | |
| 2483 | + | arg2, | |
| 2484 | + | arg3, | |
| 2485 | + | ) | |
| 2486 | + | }) | |
| 2487 | + | return _c | |
| 2488 | + | } | |
| 2489 | + | ||
| 2490 | + | func (_c *MockControlPlane_SetAttachmentSecrets_Call) Return(err error) *MockControlPlane_SetAttachmentSecrets_Call { | |
| 2491 | + | _c.Call.Return(err) | |
| 2492 | + | return _c | |
| 2493 | + | } | |
| 2494 | + | ||
| 2495 | + | func (_c *MockControlPlane_SetAttachmentSecrets_Call) RunAndReturn(run func(ctx context.Context, domain1 string, service string, secrets map[string]string) error) *MockControlPlane_SetAttachmentSecrets_Call { | |
| 2496 | + | _c.Call.Return(run) | |
| 2497 | + | return _c | |
| 2498 | + | } | |
| 2499 | + | ||
| 2500 | + | // SetSecrets provides a mock function for the type MockControlPlane | |
| 2501 | + | func (_mock *MockControlPlane) SetSecrets(ctx context.Context, secretDomain string, secrets map[string]string) error { | |
| 2502 | + | ret := _mock.Called(ctx, secretDomain, secrets) | |
| 2503 | + | ||
| 2504 | + | if len(ret) == 0 { | |
| 2505 | + | panic("no return value specified for SetSecrets") | |
| 2506 | + | } | |
| 2507 | + | ||
| 2508 | + | var r0 error | |
| 2509 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, map[string]string) error); ok { | |
| 2510 | + | r0 = returnFunc(ctx, secretDomain, secrets) | |
| 2511 | + | } else { | |
| 2512 | + | r0 = ret.Error(0) | |
| 2513 | + | } | |
| 2514 | + | return r0 | |
| 2515 | + | } | |
| 2516 | + | ||
| 2517 | + | // MockControlPlane_SetSecrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSecrets' | |
| 2518 | + | type MockControlPlane_SetSecrets_Call struct { | |
| 2519 | + | *mock.Call | |
| 2520 | + | } | |
| 2521 | + | ||
| 2522 | + | // SetSecrets is a helper method to define mock.On call | |
| 2523 | + | // - ctx context.Context | |
| 2524 | + | // - secretDomain string | |
| 2525 | + | // - secrets map[string]string | |
| 2526 | + | func (_e *MockControlPlane_Expecter) SetSecrets(ctx interface{}, secretDomain interface{}, secrets interface{}) *MockControlPlane_SetSecrets_Call { | |
| 2527 | + | return &MockControlPlane_SetSecrets_Call{Call: _e.mock.On("SetSecrets", ctx, secretDomain, secrets)} | |
| 2528 | + | } | |
| 2529 | + | ||
| 2530 | + | func (_c *MockControlPlane_SetSecrets_Call) Run(run func(ctx context.Context, secretDomain string, secrets map[string]string)) *MockControlPlane_SetSecrets_Call { | |
| 2531 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2532 | + | var arg0 context.Context | |
| 2533 | + | if args[0] != nil { | |
| 2534 | + | arg0 = args[0].(context.Context) | |
| 2535 | + | } | |
| 2536 | + | var arg1 string | |
| 2537 | + | if args[1] != nil { | |
| 2538 | + | arg1 = args[1].(string) | |
| 2539 | + | } | |
| 2540 | + | var arg2 map[string]string | |
| 2541 | + | if args[2] != nil { | |
| 2542 | + | arg2 = args[2].(map[string]string) | |
| 2543 | + | } | |
| 2544 | + | run( | |
| 2545 | + | arg0, | |
| 2546 | + | arg1, | |
| 2547 | + | arg2, | |
| 2548 | + | ) | |
| 2549 | + | }) | |
| 2550 | + | return _c | |
| 2551 | + | } | |
| 2552 | + | ||
| 2553 | + | func (_c *MockControlPlane_SetSecrets_Call) Return(err error) *MockControlPlane_SetSecrets_Call { | |
| 2554 | + | _c.Call.Return(err) | |
| 2555 | + | return _c | |
| 2556 | + | } | |
| 2557 | + | ||
| 2558 | + | func (_c *MockControlPlane_SetSecrets_Call) RunAndReturn(run func(ctx context.Context, secretDomain string, secrets map[string]string) error) *MockControlPlane_SetSecrets_Call { | |
| 2559 | + | _c.Call.Return(run) | |
| 2560 | + | return _c | |
| 2561 | + | } | |
| 2562 | + | ||
| 2563 | + | // StreamContainerLogs provides a mock function for the type MockControlPlane | |
| 2564 | + | func (_mock *MockControlPlane) StreamContainerLogs(ctx context.Context, logDomain string, lines int) (<-chan string, error) { | |
| 2565 | + | ret := _mock.Called(ctx, logDomain, lines) | |
| 2566 | + | ||
| 2567 | + | if len(ret) == 0 { | |
| 2568 | + | panic("no return value specified for StreamContainerLogs") | |
| 2569 | + | } | |
| 2570 | + | ||
| 2571 | + | var r0 <-chan string | |
| 2572 | + | var r1 error | |
| 2573 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) (<-chan string, error)); ok { | |
| 2574 | + | return returnFunc(ctx, logDomain, lines) | |
| 2575 | + | } | |
| 2576 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) <-chan string); ok { | |
| 2577 | + | r0 = returnFunc(ctx, logDomain, lines) | |
| 2578 | + | } else { | |
| 2579 | + | if ret.Get(0) != nil { | |
| 2580 | + | r0 = ret.Get(0).(<-chan string) | |
| 2581 | + | } | |
| 2582 | + | } | |
| 2583 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, int) error); ok { | |
| 2584 | + | r1 = returnFunc(ctx, logDomain, lines) | |
| 2585 | + | } else { | |
| 2586 | + | r1 = ret.Error(1) | |
| 2587 | + | } | |
| 2588 | + | return r0, r1 | |
| 2589 | + | } | |
| 2590 | + | ||
| 2591 | + | // MockControlPlane_StreamContainerLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StreamContainerLogs' | |
| 2592 | + | type MockControlPlane_StreamContainerLogs_Call struct { | |
| 2593 | + | *mock.Call | |
| 2594 | + | } | |
| 2595 | + | ||
| 2596 | + | // StreamContainerLogs is a helper method to define mock.On call | |
| 2597 | + | // - ctx context.Context | |
| 2598 | + | // - logDomain string | |
| 2599 | + | // - lines int | |
| 2600 | + | func (_e *MockControlPlane_Expecter) StreamContainerLogs(ctx interface{}, logDomain interface{}, lines interface{}) *MockControlPlane_StreamContainerLogs_Call { | |
| 2601 | + | return &MockControlPlane_StreamContainerLogs_Call{Call: _e.mock.On("StreamContainerLogs", ctx, logDomain, lines)} | |
| 2602 | + | } | |
| 2603 | + | ||
| 2604 | + | func (_c *MockControlPlane_StreamContainerLogs_Call) Run(run func(ctx context.Context, logDomain string, lines int)) *MockControlPlane_StreamContainerLogs_Call { | |
| 2605 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2606 | + | var arg0 context.Context | |
| 2607 | + | if args[0] != nil { | |
| 2608 | + | arg0 = args[0].(context.Context) | |
| 2609 | + | } | |
| 2610 | + | var arg1 string | |
| 2611 | + | if args[1] != nil { | |
| 2612 | + | arg1 = args[1].(string) | |
| 2613 | + | } | |
| 2614 | + | var arg2 int | |
| 2615 | + | if args[2] != nil { | |
| 2616 | + | arg2 = args[2].(int) | |
| 2617 | + | } | |
| 2618 | + | run( | |
| 2619 | + | arg0, | |
| 2620 | + | arg1, | |
| 2621 | + | arg2, | |
| 2622 | + | ) | |
| 2623 | + | }) | |
| 2624 | + | return _c | |
| 2625 | + | } | |
| 2626 | + | ||
| 2627 | + | func (_c *MockControlPlane_StreamContainerLogs_Call) Return(stringCh <-chan string, err error) *MockControlPlane_StreamContainerLogs_Call { | |
| 2628 | + | _c.Call.Return(stringCh, err) | |
| 2629 | + | return _c | |
| 2630 | + | } | |
| 2631 | + | ||
| 2632 | + | func (_c *MockControlPlane_StreamContainerLogs_Call) RunAndReturn(run func(ctx context.Context, logDomain string, lines int) (<-chan string, error)) *MockControlPlane_StreamContainerLogs_Call { | |
| 2633 | + | _c.Call.Return(run) | |
| 2634 | + | return _c | |
| 2635 | + | } | |
| 2636 | + | ||
| 2637 | + | // StreamProcessLogs provides a mock function for the type MockControlPlane | |
| 2638 | + | func (_mock *MockControlPlane) StreamProcessLogs(ctx context.Context, lines int) (<-chan string, error) { | |
| 2639 | + | ret := _mock.Called(ctx, lines) | |
| 2640 | + | ||
| 2641 | + | if len(ret) == 0 { | |
| 2642 | + | panic("no return value specified for StreamProcessLogs") | |
| 2643 | + | } | |
| 2644 | + | ||
| 2645 | + | var r0 <-chan string | |
| 2646 | + | var r1 error | |
| 2647 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) (<-chan string, error)); ok { | |
| 2648 | + | return returnFunc(ctx, lines) | |
| 2649 | + | } | |
| 2650 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) <-chan string); ok { | |
| 2651 | + | r0 = returnFunc(ctx, lines) | |
| 2652 | + | } else { | |
| 2653 | + | if ret.Get(0) != nil { | |
| 2654 | + | r0 = ret.Get(0).(<-chan string) | |
| 2655 | + | } | |
| 2656 | + | } | |
| 2657 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |
| 2658 | + | r1 = returnFunc(ctx, lines) | |
| 2659 | + | } else { | |
| 2660 | + | r1 = ret.Error(1) | |
| 2661 | + | } | |
| 2662 | + | return r0, r1 | |
| 2663 | + | } | |
| 2664 | + | ||
| 2665 | + | // MockControlPlane_StreamProcessLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StreamProcessLogs' | |
| 2666 | + | type MockControlPlane_StreamProcessLogs_Call struct { | |
| 2667 | + | *mock.Call | |
| 2668 | + | } | |
| 2669 | + | ||
| 2670 | + | // StreamProcessLogs is a helper method to define mock.On call | |
| 2671 | + | // - ctx context.Context | |
| 2672 | + | // - lines int | |
| 2673 | + | func (_e *MockControlPlane_Expecter) StreamProcessLogs(ctx interface{}, lines interface{}) *MockControlPlane_StreamProcessLogs_Call { | |
| 2674 | + | return &MockControlPlane_StreamProcessLogs_Call{Call: _e.mock.On("StreamProcessLogs", ctx, lines)} | |
| 2675 | + | } | |
| 2676 | + | ||
| 2677 | + | func (_c *MockControlPlane_StreamProcessLogs_Call) Run(run func(ctx context.Context, lines int)) *MockControlPlane_StreamProcessLogs_Call { | |
| 2678 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2679 | + | var arg0 context.Context | |
| 2680 | + | if args[0] != nil { | |
| 2681 | + | arg0 = args[0].(context.Context) | |
| 2682 | + | } | |
| 2683 | + | var arg1 int | |
| 2684 | + | if args[1] != nil { | |
| 2685 | + | arg1 = args[1].(int) | |
| 2686 | + | } | |
| 2687 | + | run( | |
| 2688 | + | arg0, | |
| 2689 | + | arg1, | |
| 2690 | + | ) | |
| 2691 | + | }) | |
| 2692 | + | return _c | |
| 2693 | + | } | |
| 2694 | + | ||
| 2695 | + | func (_c *MockControlPlane_StreamProcessLogs_Call) Return(stringCh <-chan string, err error) *MockControlPlane_StreamProcessLogs_Call { | |
| 2696 | + | _c.Call.Return(stringCh, err) | |
| 2697 | + | return _c | |
| 2698 | + | } | |
| 2699 | + | ||
| 2700 | + | func (_c *MockControlPlane_StreamProcessLogs_Call) RunAndReturn(run func(ctx context.Context, lines int) (<-chan string, error)) *MockControlPlane_StreamProcessLogs_Call { | |
| 2701 | + | _c.Call.Return(run) | |
| 2702 | + | return _c | |
| 2703 | + | } | |
| 2704 | + | ||
| 2705 | + | // UpdateRoute provides a mock function for the type MockControlPlane | |
| 2706 | + | func (_mock *MockControlPlane) UpdateRoute(ctx context.Context, route domain.Route) error { | |
| 2707 | + | ret := _mock.Called(ctx, route) | |
| 2708 | + | ||
| 2709 | + | if len(ret) == 0 { | |
| 2710 | + | panic("no return value specified for UpdateRoute") | |
| 2711 | + | } | |
| 2712 | + | ||
| 2713 | + | var r0 error | |
| 2714 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Route) error); ok { | |
| 2715 | + | r0 = returnFunc(ctx, route) | |
| 2716 | + | } else { | |
| 2717 | + | r0 = ret.Error(0) | |
| 2718 | + | } | |
| 2719 | + | return r0 | |
| 2720 | + | } | |
| 2721 | + | ||
| 2722 | + | // MockControlPlane_UpdateRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRoute' | |
| 2723 | + | type MockControlPlane_UpdateRoute_Call struct { | |
| 2724 | + | *mock.Call | |
| 2725 | + | } | |
| 2726 | + | ||
| 2727 | + | // UpdateRoute is a helper method to define mock.On call | |
| 2728 | + | // - ctx context.Context | |
| 2729 | + | // - route domain.Route | |
| 2730 | + | func (_e *MockControlPlane_Expecter) UpdateRoute(ctx interface{}, route interface{}) *MockControlPlane_UpdateRoute_Call { | |
| 2731 | + | return &MockControlPlane_UpdateRoute_Call{Call: _e.mock.On("UpdateRoute", ctx, route)} | |
| 2732 | + | } | |
| 2733 | + | ||
| 2734 | + | func (_c *MockControlPlane_UpdateRoute_Call) Run(run func(ctx context.Context, route domain.Route)) *MockControlPlane_UpdateRoute_Call { | |
| 2735 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 2736 | + | var arg0 context.Context | |
| 2737 | + | if args[0] != nil { | |
| 2738 | + | arg0 = args[0].(context.Context) | |
| 2739 | + | } | |
| 2740 | + | var arg1 domain.Route | |
| 2741 | + | if args[1] != nil { | |
| 2742 | + | arg1 = args[1].(domain.Route) | |
| 2743 | + | } | |
| 2744 | + | run( | |
| 2745 | + | arg0, | |
| 2746 | + | arg1, | |
| 2747 | + | ) | |
| 2748 | + | }) | |
| 2749 | + | return _c | |
| 2750 | + | } | |
| 2751 | + | ||
| 2752 | + | func (_c *MockControlPlane_UpdateRoute_Call) Return(err error) *MockControlPlane_UpdateRoute_Call { | |
| 2753 | + | _c.Call.Return(err) | |
| 2754 | + | return _c | |
| 2755 | + | } | |
| 2756 | + | ||
| 2757 | + | func (_c *MockControlPlane_UpdateRoute_Call) RunAndReturn(run func(ctx context.Context, route domain.Route) error) *MockControlPlane_UpdateRoute_Call { | |
| 2758 | + | _c.Call.Return(run) | |
| 2759 | + | return _c | |
| 2760 | + | } | |
| @@ -0,0 +1,2760 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/gordon/internal/adapters/dto" | |||
| 11 | + | "github.com/bnema/gordon/internal/adapters/in/cli/remote" | |||
| 12 | + | "github.com/bnema/gordon/internal/domain" | |||
| 13 | + | mock "github.com/stretchr/testify/mock" | |||
| 14 | + | ) | |||
| 15 | + | ||||
| 16 | + | // NewMockControlPlane creates a new instance of MockControlPlane. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 17 | + | // The first argument is typically a *testing.T value. | |||
| 18 | + | func NewMockControlPlane(t interface { | |||
| 19 | + | mock.TestingT | |||
| 20 | + | Cleanup(func()) | |||
| 21 | + | }) *MockControlPlane { | |||
| 22 | + | mock := &MockControlPlane{} | |||
| 23 | + | mock.Mock.Test(t) | |||
| 24 | + | ||||
| 25 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 26 | + | ||||
| 27 | + | return mock | |||
| 28 | + | } | |||
| 29 | + | ||||
| 30 | + | // MockControlPlane is an autogenerated mock type for the ControlPlane type | |||
| 31 | + | type MockControlPlane struct { | |||
| 32 | + | mock.Mock | |||
| 33 | + | } | |||
| 34 | + | ||||
| 35 | + | type MockControlPlane_Expecter struct { | |||
| 36 | + | mock *mock.Mock | |||
| 37 | + | } | |||
| 38 | + | ||||
| 39 | + | func (_m *MockControlPlane) EXPECT() *MockControlPlane_Expecter { | |||
| 40 | + | return &MockControlPlane_Expecter{mock: &_m.Mock} | |||
| 41 | + | } | |||
| 42 | + | ||||
| 43 | + | // AddAttachment provides a mock function for the type MockControlPlane | |||
| 44 | + | func (_mock *MockControlPlane) AddAttachment(ctx context.Context, domainOrGroup string, image string) error { | |||
| 45 | + | ret := _mock.Called(ctx, domainOrGroup, image) | |||
| 46 | + | ||||
| 47 | + | if len(ret) == 0 { | |||
| 48 | + | panic("no return value specified for AddAttachment") | |||
| 49 | + | } | |||
| 50 | + | ||||
| 51 | + | var r0 error | |||
| 52 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { | |||
| 53 | + | r0 = returnFunc(ctx, domainOrGroup, image) | |||
| 54 | + | } else { | |||
| 55 | + | r0 = ret.Error(0) | |||
| 56 | + | } | |||
| 57 | + | return r0 | |||
| 58 | + | } | |||
| 59 | + | ||||
| 60 | + | // MockControlPlane_AddAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAttachment' | |||
| 61 | + | type MockControlPlane_AddAttachment_Call struct { | |||
| 62 | + | *mock.Call | |||
| 63 | + | } | |||
| 64 | + | ||||
| 65 | + | // AddAttachment is a helper method to define mock.On call | |||
| 66 | + | // - ctx context.Context | |||
| 67 | + | // - domainOrGroup string | |||
| 68 | + | // - image string | |||
| 69 | + | func (_e *MockControlPlane_Expecter) AddAttachment(ctx interface{}, domainOrGroup interface{}, image interface{}) *MockControlPlane_AddAttachment_Call { | |||
| 70 | + | return &MockControlPlane_AddAttachment_Call{Call: _e.mock.On("AddAttachment", ctx, domainOrGroup, image)} | |||
| 71 | + | } | |||
| 72 | + | ||||
| 73 | + | func (_c *MockControlPlane_AddAttachment_Call) Run(run func(ctx context.Context, domainOrGroup string, image string)) *MockControlPlane_AddAttachment_Call { | |||
| 74 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 75 | + | var arg0 context.Context | |||
| 76 | + | if args[0] != nil { | |||
| 77 | + | arg0 = args[0].(context.Context) | |||
| 78 | + | } | |||
| 79 | + | var arg1 string | |||
| 80 | + | if args[1] != nil { | |||
| 81 | + | arg1 = args[1].(string) | |||
| 82 | + | } | |||
| 83 | + | var arg2 string | |||
| 84 | + | if args[2] != nil { | |||
| 85 | + | arg2 = args[2].(string) | |||
| 86 | + | } | |||
| 87 | + | run( | |||
| 88 | + | arg0, | |||
| 89 | + | arg1, | |||
| 90 | + | arg2, | |||
| 91 | + | ) | |||
| 92 | + | }) | |||
| 93 | + | return _c | |||
| 94 | + | } | |||
| 95 | + | ||||
| 96 | + | func (_c *MockControlPlane_AddAttachment_Call) Return(err error) *MockControlPlane_AddAttachment_Call { | |||
| 97 | + | _c.Call.Return(err) | |||
| 98 | + | return _c | |||
| 99 | + | } | |||
| 100 | + | ||||
| 101 | + | func (_c *MockControlPlane_AddAttachment_Call) RunAndReturn(run func(ctx context.Context, domainOrGroup string, image string) error) *MockControlPlane_AddAttachment_Call { | |||
| 102 | + | _c.Call.Return(run) | |||
| 103 | + | return _c | |||
| 104 | + | } | |||
| 105 | + | ||||
| 106 | + | // AddAutoRouteAllowedDomain provides a mock function for the type MockControlPlane | |||
| 107 | + | func (_mock *MockControlPlane) AddAutoRouteAllowedDomain(ctx context.Context, pattern string) error { | |||
| 108 | + | ret := _mock.Called(ctx, pattern) | |||
| 109 | + | ||||
| 110 | + | if len(ret) == 0 { | |||
| 111 | + | panic("no return value specified for AddAutoRouteAllowedDomain") | |||
| 112 | + | } | |||
| 113 | + | ||||
| 114 | + | var r0 error | |||
| 115 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 116 | + | r0 = returnFunc(ctx, pattern) | |||
| 117 | + | } else { | |||
| 118 | + | r0 = ret.Error(0) | |||
| 119 | + | } | |||
| 120 | + | return r0 | |||
| 121 | + | } | |||
| 122 | + | ||||
| 123 | + | // MockControlPlane_AddAutoRouteAllowedDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAutoRouteAllowedDomain' | |||
| 124 | + | type MockControlPlane_AddAutoRouteAllowedDomain_Call struct { | |||
| 125 | + | *mock.Call | |||
| 126 | + | } | |||
| 127 | + | ||||
| 128 | + | // AddAutoRouteAllowedDomain is a helper method to define mock.On call | |||
| 129 | + | // - ctx context.Context | |||
| 130 | + | // - pattern string | |||
| 131 | + | func (_e *MockControlPlane_Expecter) AddAutoRouteAllowedDomain(ctx interface{}, pattern interface{}) *MockControlPlane_AddAutoRouteAllowedDomain_Call { | |||
| 132 | + | return &MockControlPlane_AddAutoRouteAllowedDomain_Call{Call: _e.mock.On("AddAutoRouteAllowedDomain", ctx, pattern)} | |||
| 133 | + | } | |||
| 134 | + | ||||
| 135 | + | func (_c *MockControlPlane_AddAutoRouteAllowedDomain_Call) Run(run func(ctx context.Context, pattern string)) *MockControlPlane_AddAutoRouteAllowedDomain_Call { | |||
| 136 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 137 | + | var arg0 context.Context | |||
| 138 | + | if args[0] != nil { | |||
| 139 | + | arg0 = args[0].(context.Context) | |||
| 140 | + | } | |||
| 141 | + | var arg1 string | |||
| 142 | + | if args[1] != nil { | |||
| 143 | + | arg1 = args[1].(string) | |||
| 144 | + | } | |||
| 145 | + | run( | |||
| 146 | + | arg0, | |||
| 147 | + | arg1, | |||
| 148 | + | ) | |||
| 149 | + | }) | |||
| 150 | + | return _c | |||
| 151 | + | } | |||
| 152 | + | ||||
| 153 | + | func (_c *MockControlPlane_AddAutoRouteAllowedDomain_Call) Return(err error) *MockControlPlane_AddAutoRouteAllowedDomain_Call { | |||
| 154 | + | _c.Call.Return(err) | |||
| 155 | + | return _c | |||
| 156 | + | } | |||
| 157 | + | ||||
| 158 | + | func (_c *MockControlPlane_AddAutoRouteAllowedDomain_Call) RunAndReturn(run func(ctx context.Context, pattern string) error) *MockControlPlane_AddAutoRouteAllowedDomain_Call { | |||
| 159 | + | _c.Call.Return(run) | |||
| 160 | + | return _c | |||
| 161 | + | } | |||
| 162 | + | ||||
| 163 | + | // AddRoute provides a mock function for the type MockControlPlane | |||
| 164 | + | func (_mock *MockControlPlane) AddRoute(ctx context.Context, route domain.Route) error { | |||
| 165 | + | ret := _mock.Called(ctx, route) | |||
| 166 | + | ||||
| 167 | + | if len(ret) == 0 { | |||
| 168 | + | panic("no return value specified for AddRoute") | |||
| 169 | + | } | |||
| 170 | + | ||||
| 171 | + | var r0 error | |||
| 172 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Route) error); ok { | |||
| 173 | + | r0 = returnFunc(ctx, route) | |||
| 174 | + | } else { | |||
| 175 | + | r0 = ret.Error(0) | |||
| 176 | + | } | |||
| 177 | + | return r0 | |||
| 178 | + | } | |||
| 179 | + | ||||
| 180 | + | // MockControlPlane_AddRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddRoute' | |||
| 181 | + | type MockControlPlane_AddRoute_Call struct { | |||
| 182 | + | *mock.Call | |||
| 183 | + | } | |||
| 184 | + | ||||
| 185 | + | // AddRoute is a helper method to define mock.On call | |||
| 186 | + | // - ctx context.Context | |||
| 187 | + | // - route domain.Route | |||
| 188 | + | func (_e *MockControlPlane_Expecter) AddRoute(ctx interface{}, route interface{}) *MockControlPlane_AddRoute_Call { | |||
| 189 | + | return &MockControlPlane_AddRoute_Call{Call: _e.mock.On("AddRoute", ctx, route)} | |||
| 190 | + | } | |||
| 191 | + | ||||
| 192 | + | func (_c *MockControlPlane_AddRoute_Call) Run(run func(ctx context.Context, route domain.Route)) *MockControlPlane_AddRoute_Call { | |||
| 193 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 194 | + | var arg0 context.Context | |||
| 195 | + | if args[0] != nil { | |||
| 196 | + | arg0 = args[0].(context.Context) | |||
| 197 | + | } | |||
| 198 | + | var arg1 domain.Route | |||
| 199 | + | if args[1] != nil { | |||
| 200 | + | arg1 = args[1].(domain.Route) | |||
| 201 | + | } | |||
| 202 | + | run( | |||
| 203 | + | arg0, | |||
| 204 | + | arg1, | |||
| 205 | + | ) | |||
| 206 | + | }) | |||
| 207 | + | return _c | |||
| 208 | + | } | |||
| 209 | + | ||||
| 210 | + | func (_c *MockControlPlane_AddRoute_Call) Return(err error) *MockControlPlane_AddRoute_Call { | |||
| 211 | + | _c.Call.Return(err) | |||
| 212 | + | return _c | |||
| 213 | + | } | |||
| 214 | + | ||||
| 215 | + | func (_c *MockControlPlane_AddRoute_Call) RunAndReturn(run func(ctx context.Context, route domain.Route) error) *MockControlPlane_AddRoute_Call { | |||
| 216 | + | _c.Call.Return(run) | |||
| 217 | + | return _c | |||
| 218 | + | } | |||
| 219 | + | ||||
| 220 | + | // BackupStatus provides a mock function for the type MockControlPlane | |||
| 221 | + | func (_mock *MockControlPlane) BackupStatus(ctx context.Context) ([]dto.BackupJob, error) { | |||
| 222 | + | ret := _mock.Called(ctx) | |||
| 223 | + | ||||
| 224 | + | if len(ret) == 0 { | |||
| 225 | + | panic("no return value specified for BackupStatus") | |||
| 226 | + | } | |||
| 227 | + | ||||
| 228 | + | var r0 []dto.BackupJob | |||
| 229 | + | var r1 error | |||
| 230 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]dto.BackupJob, error)); ok { | |||
| 231 | + | return returnFunc(ctx) | |||
| 232 | + | } | |||
| 233 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []dto.BackupJob); ok { | |||
| 234 | + | r0 = returnFunc(ctx) | |||
| 235 | + | } else { | |||
| 236 | + | if ret.Get(0) != nil { | |||
| 237 | + | r0 = ret.Get(0).([]dto.BackupJob) | |||
| 238 | + | } | |||
| 239 | + | } | |||
| 240 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 241 | + | r1 = returnFunc(ctx) | |||
| 242 | + | } else { | |||
| 243 | + | r1 = ret.Error(1) | |||
| 244 | + | } | |||
| 245 | + | return r0, r1 | |||
| 246 | + | } | |||
| 247 | + | ||||
| 248 | + | // MockControlPlane_BackupStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BackupStatus' | |||
| 249 | + | type MockControlPlane_BackupStatus_Call struct { | |||
| 250 | + | *mock.Call | |||
| 251 | + | } | |||
| 252 | + | ||||
| 253 | + | // BackupStatus is a helper method to define mock.On call | |||
| 254 | + | // - ctx context.Context | |||
| 255 | + | func (_e *MockControlPlane_Expecter) BackupStatus(ctx interface{}) *MockControlPlane_BackupStatus_Call { | |||
| 256 | + | return &MockControlPlane_BackupStatus_Call{Call: _e.mock.On("BackupStatus", ctx)} | |||
| 257 | + | } | |||
| 258 | + | ||||
| 259 | + | func (_c *MockControlPlane_BackupStatus_Call) Run(run func(ctx context.Context)) *MockControlPlane_BackupStatus_Call { | |||
| 260 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 261 | + | var arg0 context.Context | |||
| 262 | + | if args[0] != nil { | |||
| 263 | + | arg0 = args[0].(context.Context) | |||
| 264 | + | } | |||
| 265 | + | run( | |||
| 266 | + | arg0, | |||
| 267 | + | ) | |||
| 268 | + | }) | |||
| 269 | + | return _c | |||
| 270 | + | } | |||
| 271 | + | ||||
| 272 | + | func (_c *MockControlPlane_BackupStatus_Call) Return(backupJobs []dto.BackupJob, err error) *MockControlPlane_BackupStatus_Call { | |||
| 273 | + | _c.Call.Return(backupJobs, err) | |||
| 274 | + | return _c | |||
| 275 | + | } | |||
| 276 | + | ||||
| 277 | + | func (_c *MockControlPlane_BackupStatus_Call) RunAndReturn(run func(ctx context.Context) ([]dto.BackupJob, error)) *MockControlPlane_BackupStatus_Call { | |||
| 278 | + | _c.Call.Return(run) | |||
| 279 | + | return _c | |||
| 280 | + | } | |||
| 281 | + | ||||
| 282 | + | // Bootstrap provides a mock function for the type MockControlPlane | |||
| 283 | + | func (_mock *MockControlPlane) Bootstrap(ctx context.Context, req dto.BootstrapRequest) (*dto.BootstrapResponse, error) { | |||
| 284 | + | ret := _mock.Called(ctx, req) | |||
| 285 | + | ||||
| 286 | + | if len(ret) == 0 { | |||
| 287 | + | panic("no return value specified for Bootstrap") | |||
| 288 | + | } | |||
| 289 | + | ||||
| 290 | + | var r0 *dto.BootstrapResponse | |||
| 291 | + | var r1 error | |||
| 292 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.BootstrapRequest) (*dto.BootstrapResponse, error)); ok { | |||
| 293 | + | return returnFunc(ctx, req) | |||
| 294 | + | } | |||
| 295 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.BootstrapRequest) *dto.BootstrapResponse); ok { | |||
| 296 | + | r0 = returnFunc(ctx, req) | |||
| 297 | + | } else { | |||
| 298 | + | if ret.Get(0) != nil { | |||
| 299 | + | r0 = ret.Get(0).(*dto.BootstrapResponse) | |||
| 300 | + | } | |||
| 301 | + | } | |||
| 302 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, dto.BootstrapRequest) error); ok { | |||
| 303 | + | r1 = returnFunc(ctx, req) | |||
| 304 | + | } else { | |||
| 305 | + | r1 = ret.Error(1) | |||
| 306 | + | } | |||
| 307 | + | return r0, r1 | |||
| 308 | + | } | |||
| 309 | + | ||||
| 310 | + | // MockControlPlane_Bootstrap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bootstrap' | |||
| 311 | + | type MockControlPlane_Bootstrap_Call struct { | |||
| 312 | + | *mock.Call | |||
| 313 | + | } | |||
| 314 | + | ||||
| 315 | + | // Bootstrap is a helper method to define mock.On call | |||
| 316 | + | // - ctx context.Context | |||
| 317 | + | // - req dto.BootstrapRequest | |||
| 318 | + | func (_e *MockControlPlane_Expecter) Bootstrap(ctx interface{}, req interface{}) *MockControlPlane_Bootstrap_Call { | |||
| 319 | + | return &MockControlPlane_Bootstrap_Call{Call: _e.mock.On("Bootstrap", ctx, req)} | |||
| 320 | + | } | |||
| 321 | + | ||||
| 322 | + | func (_c *MockControlPlane_Bootstrap_Call) Run(run func(ctx context.Context, req dto.BootstrapRequest)) *MockControlPlane_Bootstrap_Call { | |||
| 323 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 324 | + | var arg0 context.Context | |||
| 325 | + | if args[0] != nil { | |||
| 326 | + | arg0 = args[0].(context.Context) | |||
| 327 | + | } | |||
| 328 | + | var arg1 dto.BootstrapRequest | |||
| 329 | + | if args[1] != nil { | |||
| 330 | + | arg1 = args[1].(dto.BootstrapRequest) | |||
| 331 | + | } | |||
| 332 | + | run( | |||
| 333 | + | arg0, | |||
| 334 | + | arg1, | |||
| 335 | + | ) | |||
| 336 | + | }) | |||
| 337 | + | return _c | |||
| 338 | + | } | |||
| 339 | + | ||||
| 340 | + | func (_c *MockControlPlane_Bootstrap_Call) Return(bootstrapResponse *dto.BootstrapResponse, err error) *MockControlPlane_Bootstrap_Call { | |||
| 341 | + | _c.Call.Return(bootstrapResponse, err) | |||
| 342 | + | return _c | |||
| 343 | + | } | |||
| 344 | + | ||||
| 345 | + | func (_c *MockControlPlane_Bootstrap_Call) RunAndReturn(run func(ctx context.Context, req dto.BootstrapRequest) (*dto.BootstrapResponse, error)) *MockControlPlane_Bootstrap_Call { | |||
| 346 | + | _c.Call.Return(run) | |||
| 347 | + | return _c | |||
| 348 | + | } | |||
| 349 | + | ||||
| 350 | + | // CleanupOrphanedAttachments provides a mock function for the type MockControlPlane | |||
| 351 | + | func (_mock *MockControlPlane) CleanupOrphanedAttachments(ctx context.Context, owner string, stop bool) (*domain.CleanupReport, error) { | |||
| 352 | + | ret := _mock.Called(ctx, owner, stop) | |||
| 353 | + | ||||
| 354 | + | if len(ret) == 0 { | |||
| 355 | + | panic("no return value specified for CleanupOrphanedAttachments") | |||
| 356 | + | } | |||
| 357 | + | ||||
| 358 | + | var r0 *domain.CleanupReport | |||
| 359 | + | var r1 error | |||
| 360 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) (*domain.CleanupReport, error)); ok { | |||
| 361 | + | return returnFunc(ctx, owner, stop) | |||
| 362 | + | } | |||
| 363 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) *domain.CleanupReport); ok { | |||
| 364 | + | r0 = returnFunc(ctx, owner, stop) | |||
| 365 | + | } else { | |||
| 366 | + | if ret.Get(0) != nil { | |||
| 367 | + | r0 = ret.Get(0).(*domain.CleanupReport) | |||
| 368 | + | } | |||
| 369 | + | } | |||
| 370 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { | |||
| 371 | + | r1 = returnFunc(ctx, owner, stop) | |||
| 372 | + | } else { | |||
| 373 | + | r1 = ret.Error(1) | |||
| 374 | + | } | |||
| 375 | + | return r0, r1 | |||
| 376 | + | } | |||
| 377 | + | ||||
| 378 | + | // MockControlPlane_CleanupOrphanedAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CleanupOrphanedAttachments' | |||
| 379 | + | type MockControlPlane_CleanupOrphanedAttachments_Call struct { | |||
| 380 | + | *mock.Call | |||
| 381 | + | } | |||
| 382 | + | ||||
| 383 | + | // CleanupOrphanedAttachments is a helper method to define mock.On call | |||
| 384 | + | // - ctx context.Context | |||
| 385 | + | // - owner string | |||
| 386 | + | // - stop bool | |||
| 387 | + | func (_e *MockControlPlane_Expecter) CleanupOrphanedAttachments(ctx interface{}, owner interface{}, stop interface{}) *MockControlPlane_CleanupOrphanedAttachments_Call { | |||
| 388 | + | return &MockControlPlane_CleanupOrphanedAttachments_Call{Call: _e.mock.On("CleanupOrphanedAttachments", ctx, owner, stop)} | |||
| 389 | + | } | |||
| 390 | + | ||||
| 391 | + | func (_c *MockControlPlane_CleanupOrphanedAttachments_Call) Run(run func(ctx context.Context, owner string, stop bool)) *MockControlPlane_CleanupOrphanedAttachments_Call { | |||
| 392 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 393 | + | var arg0 context.Context | |||
| 394 | + | if args[0] != nil { | |||
| 395 | + | arg0 = args[0].(context.Context) | |||
| 396 | + | } | |||
| 397 | + | var arg1 string | |||
| 398 | + | if args[1] != nil { | |||
| 399 | + | arg1 = args[1].(string) | |||
| 400 | + | } | |||
| 401 | + | var arg2 bool | |||
| 402 | + | if args[2] != nil { | |||
| 403 | + | arg2 = args[2].(bool) | |||
| 404 | + | } | |||
| 405 | + | run( | |||
| 406 | + | arg0, | |||
| 407 | + | arg1, | |||
| 408 | + | arg2, | |||
| 409 | + | ) | |||
| 410 | + | }) | |||
| 411 | + | return _c | |||
| 412 | + | } | |||
| 413 | + | ||||
| 414 | + | func (_c *MockControlPlane_CleanupOrphanedAttachments_Call) Return(cleanupReport *domain.CleanupReport, err error) *MockControlPlane_CleanupOrphanedAttachments_Call { | |||
| 415 | + | _c.Call.Return(cleanupReport, err) | |||
| 416 | + | return _c | |||
| 417 | + | } | |||
| 418 | + | ||||
| 419 | + | func (_c *MockControlPlane_CleanupOrphanedAttachments_Call) RunAndReturn(run func(ctx context.Context, owner string, stop bool) (*domain.CleanupReport, error)) *MockControlPlane_CleanupOrphanedAttachments_Call { | |||
| 420 | + | _c.Call.Return(run) | |||
| 421 | + | return _c | |||
| 422 | + | } | |||
| 423 | + | ||||
| 424 | + | // DeleteAttachmentSecret provides a mock function for the type MockControlPlane | |||
| 425 | + | func (_mock *MockControlPlane) DeleteAttachmentSecret(ctx context.Context, domain1 string, service string, key string) error { | |||
| 426 | + | ret := _mock.Called(ctx, domain1, service, key) | |||
| 427 | + | ||||
| 428 | + | if len(ret) == 0 { | |||
| 429 | + | panic("no return value specified for DeleteAttachmentSecret") | |||
| 430 | + | } | |||
| 431 | + | ||||
| 432 | + | var r0 error | |||
| 433 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok { | |||
| 434 | + | r0 = returnFunc(ctx, domain1, service, key) | |||
| 435 | + | } else { | |||
| 436 | + | r0 = ret.Error(0) | |||
| 437 | + | } | |||
| 438 | + | return r0 | |||
| 439 | + | } | |||
| 440 | + | ||||
| 441 | + | // MockControlPlane_DeleteAttachmentSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAttachmentSecret' | |||
| 442 | + | type MockControlPlane_DeleteAttachmentSecret_Call struct { | |||
| 443 | + | *mock.Call | |||
| 444 | + | } | |||
| 445 | + | ||||
| 446 | + | // DeleteAttachmentSecret is a helper method to define mock.On call | |||
| 447 | + | // - ctx context.Context | |||
| 448 | + | // - domain1 string | |||
| 449 | + | // - service string | |||
| 450 | + | // - key string | |||
| 451 | + | func (_e *MockControlPlane_Expecter) DeleteAttachmentSecret(ctx interface{}, domain1 interface{}, service interface{}, key interface{}) *MockControlPlane_DeleteAttachmentSecret_Call { | |||
| 452 | + | return &MockControlPlane_DeleteAttachmentSecret_Call{Call: _e.mock.On("DeleteAttachmentSecret", ctx, domain1, service, key)} | |||
| 453 | + | } | |||
| 454 | + | ||||
| 455 | + | func (_c *MockControlPlane_DeleteAttachmentSecret_Call) Run(run func(ctx context.Context, domain1 string, service string, key string)) *MockControlPlane_DeleteAttachmentSecret_Call { | |||
| 456 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 457 | + | var arg0 context.Context | |||
| 458 | + | if args[0] != nil { | |||
| 459 | + | arg0 = args[0].(context.Context) | |||
| 460 | + | } | |||
| 461 | + | var arg1 string | |||
| 462 | + | if args[1] != nil { | |||
| 463 | + | arg1 = args[1].(string) | |||
| 464 | + | } | |||
| 465 | + | var arg2 string | |||
| 466 | + | if args[2] != nil { | |||
| 467 | + | arg2 = args[2].(string) | |||
| 468 | + | } | |||
| 469 | + | var arg3 string | |||
| 470 | + | if args[3] != nil { | |||
| 471 | + | arg3 = args[3].(string) | |||
| 472 | + | } | |||
| 473 | + | run( | |||
| 474 | + | arg0, | |||
| 475 | + | arg1, | |||
| 476 | + | arg2, | |||
| 477 | + | arg3, | |||
| 478 | + | ) | |||
| 479 | + | }) | |||
| 480 | + | return _c | |||
| 481 | + | } | |||
| 482 | + | ||||
| 483 | + | func (_c *MockControlPlane_DeleteAttachmentSecret_Call) Return(err error) *MockControlPlane_DeleteAttachmentSecret_Call { | |||
| 484 | + | _c.Call.Return(err) | |||
| 485 | + | return _c | |||
| 486 | + | } | |||
| 487 | + | ||||
| 488 | + | func (_c *MockControlPlane_DeleteAttachmentSecret_Call) RunAndReturn(run func(ctx context.Context, domain1 string, service string, key string) error) *MockControlPlane_DeleteAttachmentSecret_Call { | |||
| 489 | + | _c.Call.Return(run) | |||
| 490 | + | return _c | |||
| 491 | + | } | |||
| 492 | + | ||||
| 493 | + | // DeleteSecret provides a mock function for the type MockControlPlane | |||
| 494 | + | func (_mock *MockControlPlane) DeleteSecret(ctx context.Context, secretDomain string, key string) error { | |||
| 495 | + | ret := _mock.Called(ctx, secretDomain, key) | |||
| 496 | + | ||||
| 497 | + | if len(ret) == 0 { | |||
| 498 | + | panic("no return value specified for DeleteSecret") | |||
| 499 | + | } | |||
| 500 | + | ||||
| 501 | + | var r0 error | |||
| 502 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { | |||
| 503 | + | r0 = returnFunc(ctx, secretDomain, key) | |||
| 504 | + | } else { | |||
| 505 | + | r0 = ret.Error(0) | |||
| 506 | + | } | |||
| 507 | + | return r0 | |||
| 508 | + | } | |||
| 509 | + | ||||
| 510 | + | // MockControlPlane_DeleteSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSecret' | |||
| 511 | + | type MockControlPlane_DeleteSecret_Call struct { | |||
| 512 | + | *mock.Call | |||
| 513 | + | } | |||
| 514 | + | ||||
| 515 | + | // DeleteSecret is a helper method to define mock.On call | |||
| 516 | + | // - ctx context.Context | |||
| 517 | + | // - secretDomain string | |||
| 518 | + | // - key string | |||
| 519 | + | func (_e *MockControlPlane_Expecter) DeleteSecret(ctx interface{}, secretDomain interface{}, key interface{}) *MockControlPlane_DeleteSecret_Call { | |||
| 520 | + | return &MockControlPlane_DeleteSecret_Call{Call: _e.mock.On("DeleteSecret", ctx, secretDomain, key)} | |||
| 521 | + | } | |||
| 522 | + | ||||
| 523 | + | func (_c *MockControlPlane_DeleteSecret_Call) Run(run func(ctx context.Context, secretDomain string, key string)) *MockControlPlane_DeleteSecret_Call { | |||
| 524 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 525 | + | var arg0 context.Context | |||
| 526 | + | if args[0] != nil { | |||
| 527 | + | arg0 = args[0].(context.Context) | |||
| 528 | + | } | |||
| 529 | + | var arg1 string | |||
| 530 | + | if args[1] != nil { | |||
| 531 | + | arg1 = args[1].(string) | |||
| 532 | + | } | |||
| 533 | + | var arg2 string | |||
| 534 | + | if args[2] != nil { | |||
| 535 | + | arg2 = args[2].(string) | |||
| 536 | + | } | |||
| 537 | + | run( | |||
| 538 | + | arg0, | |||
| 539 | + | arg1, | |||
| 540 | + | arg2, | |||
| 541 | + | ) | |||
| 542 | + | }) | |||
| 543 | + | return _c | |||
| 544 | + | } | |||
| 545 | + | ||||
| 546 | + | func (_c *MockControlPlane_DeleteSecret_Call) Return(err error) *MockControlPlane_DeleteSecret_Call { | |||
| 547 | + | _c.Call.Return(err) | |||
| 548 | + | return _c | |||
| 549 | + | } | |||
| 550 | + | ||||
| 551 | + | func (_c *MockControlPlane_DeleteSecret_Call) RunAndReturn(run func(ctx context.Context, secretDomain string, key string) error) *MockControlPlane_DeleteSecret_Call { | |||
| 552 | + | _c.Call.Return(run) | |||
| 553 | + | return _c | |||
| 554 | + | } | |||
| 555 | + | ||||
| 556 | + | // Deploy provides a mock function for the type MockControlPlane | |||
| 557 | + | func (_mock *MockControlPlane) Deploy(ctx context.Context, deployDomain string) (*remote.DeployResult, error) { | |||
| 558 | + | ret := _mock.Called(ctx, deployDomain) | |||
| 559 | + | ||||
| 560 | + | if len(ret) == 0 { | |||
| 561 | + | panic("no return value specified for Deploy") | |||
| 562 | + | } | |||
| 563 | + | ||||
| 564 | + | var r0 *remote.DeployResult | |||
| 565 | + | var r1 error | |||
| 566 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*remote.DeployResult, error)); ok { | |||
| 567 | + | return returnFunc(ctx, deployDomain) | |||
| 568 | + | } | |||
| 569 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *remote.DeployResult); ok { | |||
| 570 | + | r0 = returnFunc(ctx, deployDomain) | |||
| 571 | + | } else { | |||
| 572 | + | if ret.Get(0) != nil { | |||
| 573 | + | r0 = ret.Get(0).(*remote.DeployResult) | |||
| 574 | + | } | |||
| 575 | + | } | |||
| 576 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 577 | + | r1 = returnFunc(ctx, deployDomain) | |||
| 578 | + | } else { | |||
| 579 | + | r1 = ret.Error(1) | |||
| 580 | + | } | |||
| 581 | + | return r0, r1 | |||
| 582 | + | } | |||
| 583 | + | ||||
| 584 | + | // MockControlPlane_Deploy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deploy' | |||
| 585 | + | type MockControlPlane_Deploy_Call struct { | |||
| 586 | + | *mock.Call | |||
| 587 | + | } | |||
| 588 | + | ||||
| 589 | + | // Deploy is a helper method to define mock.On call | |||
| 590 | + | // - ctx context.Context | |||
| 591 | + | // - deployDomain string | |||
| 592 | + | func (_e *MockControlPlane_Expecter) Deploy(ctx interface{}, deployDomain interface{}) *MockControlPlane_Deploy_Call { | |||
| 593 | + | return &MockControlPlane_Deploy_Call{Call: _e.mock.On("Deploy", ctx, deployDomain)} | |||
| 594 | + | } | |||
| 595 | + | ||||
| 596 | + | func (_c *MockControlPlane_Deploy_Call) Run(run func(ctx context.Context, deployDomain string)) *MockControlPlane_Deploy_Call { | |||
| 597 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 598 | + | var arg0 context.Context | |||
| 599 | + | if args[0] != nil { | |||
| 600 | + | arg0 = args[0].(context.Context) | |||
| 601 | + | } | |||
| 602 | + | var arg1 string | |||
| 603 | + | if args[1] != nil { | |||
| 604 | + | arg1 = args[1].(string) | |||
| 605 | + | } | |||
| 606 | + | run( | |||
| 607 | + | arg0, | |||
| 608 | + | arg1, | |||
| 609 | + | ) | |||
| 610 | + | }) | |||
| 611 | + | return _c | |||
| 612 | + | } | |||
| 613 | + | ||||
| 614 | + | func (_c *MockControlPlane_Deploy_Call) Return(deployResult *remote.DeployResult, err error) *MockControlPlane_Deploy_Call { | |||
| 615 | + | _c.Call.Return(deployResult, err) | |||
| 616 | + | return _c | |||
| 617 | + | } | |||
| 618 | + | ||||
| 619 | + | func (_c *MockControlPlane_Deploy_Call) RunAndReturn(run func(ctx context.Context, deployDomain string) (*remote.DeployResult, error)) *MockControlPlane_Deploy_Call { | |||
| 620 | + | _c.Call.Return(run) | |||
| 621 | + | return _c | |||
| 622 | + | } | |||
| 623 | + | ||||
| 624 | + | // DeployIntent provides a mock function for the type MockControlPlane | |||
| 625 | + | func (_mock *MockControlPlane) DeployIntent(ctx context.Context, imageName string) error { | |||
| 626 | + | ret := _mock.Called(ctx, imageName) | |||
| 627 | + | ||||
| 628 | + | if len(ret) == 0 { | |||
| 629 | + | panic("no return value specified for DeployIntent") | |||
| 630 | + | } | |||
| 631 | + | ||||
| 632 | + | var r0 error | |||
| 633 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 634 | + | r0 = returnFunc(ctx, imageName) | |||
| 635 | + | } else { | |||
| 636 | + | r0 = ret.Error(0) | |||
| 637 | + | } | |||
| 638 | + | return r0 | |||
| 639 | + | } | |||
| 640 | + | ||||
| 641 | + | // MockControlPlane_DeployIntent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeployIntent' | |||
| 642 | + | type MockControlPlane_DeployIntent_Call struct { | |||
| 643 | + | *mock.Call | |||
| 644 | + | } | |||
| 645 | + | ||||
| 646 | + | // DeployIntent is a helper method to define mock.On call | |||
| 647 | + | // - ctx context.Context | |||
| 648 | + | // - imageName string | |||
| 649 | + | func (_e *MockControlPlane_Expecter) DeployIntent(ctx interface{}, imageName interface{}) *MockControlPlane_DeployIntent_Call { | |||
| 650 | + | return &MockControlPlane_DeployIntent_Call{Call: _e.mock.On("DeployIntent", ctx, imageName)} | |||
| 651 | + | } | |||
| 652 | + | ||||
| 653 | + | func (_c *MockControlPlane_DeployIntent_Call) Run(run func(ctx context.Context, imageName string)) *MockControlPlane_DeployIntent_Call { | |||
| 654 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 655 | + | var arg0 context.Context | |||
| 656 | + | if args[0] != nil { | |||
| 657 | + | arg0 = args[0].(context.Context) | |||
| 658 | + | } | |||
| 659 | + | var arg1 string | |||
| 660 | + | if args[1] != nil { | |||
| 661 | + | arg1 = args[1].(string) | |||
| 662 | + | } | |||
| 663 | + | run( | |||
| 664 | + | arg0, | |||
| 665 | + | arg1, | |||
| 666 | + | ) | |||
| 667 | + | }) | |||
| 668 | + | return _c | |||
| 669 | + | } | |||
| 670 | + | ||||
| 671 | + | func (_c *MockControlPlane_DeployIntent_Call) Return(err error) *MockControlPlane_DeployIntent_Call { | |||
| 672 | + | _c.Call.Return(err) | |||
| 673 | + | return _c | |||
| 674 | + | } | |||
| 675 | + | ||||
| 676 | + | func (_c *MockControlPlane_DeployIntent_Call) RunAndReturn(run func(ctx context.Context, imageName string) error) *MockControlPlane_DeployIntent_Call { | |||
| 677 | + | _c.Call.Return(run) | |||
| 678 | + | return _c | |||
| 679 | + | } | |||
| 680 | + | ||||
| 681 | + | // DetectDatabases provides a mock function for the type MockControlPlane | |||
| 682 | + | func (_mock *MockControlPlane) DetectDatabases(ctx context.Context, backupDomain string) ([]dto.DatabaseInfo, error) { | |||
| 683 | + | ret := _mock.Called(ctx, backupDomain) | |||
| 684 | + | ||||
| 685 | + | if len(ret) == 0 { | |||
| 686 | + | panic("no return value specified for DetectDatabases") | |||
| 687 | + | } | |||
| 688 | + | ||||
| 689 | + | var r0 []dto.DatabaseInfo | |||
| 690 | + | var r1 error | |||
| 691 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]dto.DatabaseInfo, error)); ok { | |||
| 692 | + | return returnFunc(ctx, backupDomain) | |||
| 693 | + | } | |||
| 694 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []dto.DatabaseInfo); ok { | |||
| 695 | + | r0 = returnFunc(ctx, backupDomain) | |||
| 696 | + | } else { | |||
| 697 | + | if ret.Get(0) != nil { | |||
| 698 | + | r0 = ret.Get(0).([]dto.DatabaseInfo) | |||
| 699 | + | } | |||
| 700 | + | } | |||
| 701 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 702 | + | r1 = returnFunc(ctx, backupDomain) | |||
| 703 | + | } else { | |||
| 704 | + | r1 = ret.Error(1) | |||
| 705 | + | } | |||
| 706 | + | return r0, r1 | |||
| 707 | + | } | |||
| 708 | + | ||||
| 709 | + | // MockControlPlane_DetectDatabases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectDatabases' | |||
| 710 | + | type MockControlPlane_DetectDatabases_Call struct { | |||
| 711 | + | *mock.Call | |||
| 712 | + | } | |||
| 713 | + | ||||
| 714 | + | // DetectDatabases is a helper method to define mock.On call | |||
| 715 | + | // - ctx context.Context | |||
| 716 | + | // - backupDomain string | |||
| 717 | + | func (_e *MockControlPlane_Expecter) DetectDatabases(ctx interface{}, backupDomain interface{}) *MockControlPlane_DetectDatabases_Call { | |||
| 718 | + | return &MockControlPlane_DetectDatabases_Call{Call: _e.mock.On("DetectDatabases", ctx, backupDomain)} | |||
| 719 | + | } | |||
| 720 | + | ||||
| 721 | + | func (_c *MockControlPlane_DetectDatabases_Call) Run(run func(ctx context.Context, backupDomain string)) *MockControlPlane_DetectDatabases_Call { | |||
| 722 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 723 | + | var arg0 context.Context | |||
| 724 | + | if args[0] != nil { | |||
| 725 | + | arg0 = args[0].(context.Context) | |||
| 726 | + | } | |||
| 727 | + | var arg1 string | |||
| 728 | + | if args[1] != nil { | |||
| 729 | + | arg1 = args[1].(string) | |||
| 730 | + | } | |||
| 731 | + | run( | |||
| 732 | + | arg0, | |||
| 733 | + | arg1, | |||
| 734 | + | ) | |||
| 735 | + | }) | |||
| 736 | + | return _c | |||
| 737 | + | } | |||
| 738 | + | ||||
| 739 | + | func (_c *MockControlPlane_DetectDatabases_Call) Return(databaseInfos []dto.DatabaseInfo, err error) *MockControlPlane_DetectDatabases_Call { | |||
| 740 | + | _c.Call.Return(databaseInfos, err) | |||
| 741 | + | return _c | |||
| 742 | + | } | |||
| 743 | + | ||||
| 744 | + | func (_c *MockControlPlane_DetectDatabases_Call) RunAndReturn(run func(ctx context.Context, backupDomain string) ([]dto.DatabaseInfo, error)) *MockControlPlane_DetectDatabases_Call { | |||
| 745 | + | _c.Call.Return(run) | |||
| 746 | + | return _c | |||
| 747 | + | } | |||
| 748 | + | ||||
| 749 | + | // FindAttachmentTargetsByImage provides a mock function for the type MockControlPlane | |||
| 750 | + | func (_mock *MockControlPlane) FindAttachmentTargetsByImage(ctx context.Context, imageName string) ([]string, error) { | |||
| 751 | + | ret := _mock.Called(ctx, imageName) | |||
| 752 | + | ||||
| 753 | + | if len(ret) == 0 { | |||
| 754 | + | panic("no return value specified for FindAttachmentTargetsByImage") | |||
| 755 | + | } | |||
| 756 | + | ||||
| 757 | + | var r0 []string | |||
| 758 | + | var r1 error | |||
| 759 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { | |||
| 760 | + | return returnFunc(ctx, imageName) | |||
| 761 | + | } | |||
| 762 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok { | |||
| 763 | + | r0 = returnFunc(ctx, imageName) | |||
| 764 | + | } else { | |||
| 765 | + | if ret.Get(0) != nil { | |||
| 766 | + | r0 = ret.Get(0).([]string) | |||
| 767 | + | } | |||
| 768 | + | } | |||
| 769 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 770 | + | r1 = returnFunc(ctx, imageName) | |||
| 771 | + | } else { | |||
| 772 | + | r1 = ret.Error(1) | |||
| 773 | + | } | |||
| 774 | + | return r0, r1 | |||
| 775 | + | } | |||
| 776 | + | ||||
| 777 | + | // MockControlPlane_FindAttachmentTargetsByImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindAttachmentTargetsByImage' | |||
| 778 | + | type MockControlPlane_FindAttachmentTargetsByImage_Call struct { | |||
| 779 | + | *mock.Call | |||
| 780 | + | } | |||
| 781 | + | ||||
| 782 | + | // FindAttachmentTargetsByImage is a helper method to define mock.On call | |||
| 783 | + | // - ctx context.Context | |||
| 784 | + | // - imageName string | |||
| 785 | + | func (_e *MockControlPlane_Expecter) FindAttachmentTargetsByImage(ctx interface{}, imageName interface{}) *MockControlPlane_FindAttachmentTargetsByImage_Call { | |||
| 786 | + | return &MockControlPlane_FindAttachmentTargetsByImage_Call{Call: _e.mock.On("FindAttachmentTargetsByImage", ctx, imageName)} | |||
| 787 | + | } | |||
| 788 | + | ||||
| 789 | + | func (_c *MockControlPlane_FindAttachmentTargetsByImage_Call) Run(run func(ctx context.Context, imageName string)) *MockControlPlane_FindAttachmentTargetsByImage_Call { | |||
| 790 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 791 | + | var arg0 context.Context | |||
| 792 | + | if args[0] != nil { | |||
| 793 | + | arg0 = args[0].(context.Context) | |||
| 794 | + | } | |||
| 795 | + | var arg1 string | |||
| 796 | + | if args[1] != nil { | |||
| 797 | + | arg1 = args[1].(string) | |||
| 798 | + | } | |||
| 799 | + | run( | |||
| 800 | + | arg0, | |||
| 801 | + | arg1, | |||
| 802 | + | ) | |||
| 803 | + | }) | |||
| 804 | + | return _c | |||
| 805 | + | } | |||
| 806 | + | ||||
| 807 | + | func (_c *MockControlPlane_FindAttachmentTargetsByImage_Call) Return(strings []string, err error) *MockControlPlane_FindAttachmentTargetsByImage_Call { | |||
| 808 | + | _c.Call.Return(strings, err) | |||
| 809 | + | return _c | |||
| 810 | + | } | |||
| 811 | + | ||||
| 812 | + | func (_c *MockControlPlane_FindAttachmentTargetsByImage_Call) RunAndReturn(run func(ctx context.Context, imageName string) ([]string, error)) *MockControlPlane_FindAttachmentTargetsByImage_Call { | |||
| 813 | + | _c.Call.Return(run) | |||
| 814 | + | return _c | |||
| 815 | + | } | |||
| 816 | + | ||||
| 817 | + | // FindRoutesByImage provides a mock function for the type MockControlPlane | |||
| 818 | + | func (_mock *MockControlPlane) FindRoutesByImage(ctx context.Context, imageName string) ([]domain.Route, error) { | |||
| 819 | + | ret := _mock.Called(ctx, imageName) | |||
| 820 | + | ||||
| 821 | + | if len(ret) == 0 { | |||
| 822 | + | panic("no return value specified for FindRoutesByImage") | |||
| 823 | + | } | |||
| 824 | + | ||||
| 825 | + | var r0 []domain.Route | |||
| 826 | + | var r1 error | |||
| 827 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]domain.Route, error)); ok { | |||
| 828 | + | return returnFunc(ctx, imageName) | |||
| 829 | + | } | |||
| 830 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []domain.Route); ok { | |||
| 831 | + | r0 = returnFunc(ctx, imageName) | |||
| 832 | + | } else { | |||
| 833 | + | if ret.Get(0) != nil { | |||
| 834 | + | r0 = ret.Get(0).([]domain.Route) | |||
| 835 | + | } | |||
| 836 | + | } | |||
| 837 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 838 | + | r1 = returnFunc(ctx, imageName) | |||
| 839 | + | } else { | |||
| 840 | + | r1 = ret.Error(1) | |||
| 841 | + | } | |||
| 842 | + | return r0, r1 | |||
| 843 | + | } | |||
| 844 | + | ||||
| 845 | + | // MockControlPlane_FindRoutesByImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindRoutesByImage' | |||
| 846 | + | type MockControlPlane_FindRoutesByImage_Call struct { | |||
| 847 | + | *mock.Call | |||
| 848 | + | } | |||
| 849 | + | ||||
| 850 | + | // FindRoutesByImage is a helper method to define mock.On call | |||
| 851 | + | // - ctx context.Context | |||
| 852 | + | // - imageName string | |||
| 853 | + | func (_e *MockControlPlane_Expecter) FindRoutesByImage(ctx interface{}, imageName interface{}) *MockControlPlane_FindRoutesByImage_Call { | |||
| 854 | + | return &MockControlPlane_FindRoutesByImage_Call{Call: _e.mock.On("FindRoutesByImage", ctx, imageName)} | |||
| 855 | + | } | |||
| 856 | + | ||||
| 857 | + | func (_c *MockControlPlane_FindRoutesByImage_Call) Run(run func(ctx context.Context, imageName string)) *MockControlPlane_FindRoutesByImage_Call { | |||
| 858 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 859 | + | var arg0 context.Context | |||
| 860 | + | if args[0] != nil { | |||
| 861 | + | arg0 = args[0].(context.Context) | |||
| 862 | + | } | |||
| 863 | + | var arg1 string | |||
| 864 | + | if args[1] != nil { | |||
| 865 | + | arg1 = args[1].(string) | |||
| 866 | + | } | |||
| 867 | + | run( | |||
| 868 | + | arg0, | |||
| 869 | + | arg1, | |||
| 870 | + | ) | |||
| 871 | + | }) | |||
| 872 | + | return _c | |||
| 873 | + | } | |||
| 874 | + | ||||
| 875 | + | func (_c *MockControlPlane_FindRoutesByImage_Call) Return(routes []domain.Route, err error) *MockControlPlane_FindRoutesByImage_Call { | |||
| 876 | + | _c.Call.Return(routes, err) | |||
| 877 | + | return _c | |||
| 878 | + | } | |||
| 879 | + | ||||
| 880 | + | func (_c *MockControlPlane_FindRoutesByImage_Call) RunAndReturn(run func(ctx context.Context, imageName string) ([]domain.Route, error)) *MockControlPlane_FindRoutesByImage_Call { | |||
| 881 | + | _c.Call.Return(run) | |||
| 882 | + | return _c | |||
| 883 | + | } | |||
| 884 | + | ||||
| 885 | + | // GetAllAttachmentsConfig provides a mock function for the type MockControlPlane | |||
| 886 | + | func (_mock *MockControlPlane) GetAllAttachmentsConfig(ctx context.Context) (map[string][]string, error) { | |||
| 887 | + | ret := _mock.Called(ctx) | |||
| 888 | + | ||||
| 889 | + | if len(ret) == 0 { | |||
| 890 | + | panic("no return value specified for GetAllAttachmentsConfig") | |||
| 891 | + | } | |||
| 892 | + | ||||
| 893 | + | var r0 map[string][]string | |||
| 894 | + | var r1 error | |||
| 895 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (map[string][]string, error)); ok { | |||
| 896 | + | return returnFunc(ctx) | |||
| 897 | + | } | |||
| 898 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) map[string][]string); ok { | |||
| 899 | + | r0 = returnFunc(ctx) | |||
| 900 | + | } else { | |||
| 901 | + | if ret.Get(0) != nil { | |||
| 902 | + | r0 = ret.Get(0).(map[string][]string) | |||
| 903 | + | } | |||
| 904 | + | } | |||
| 905 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 906 | + | r1 = returnFunc(ctx) | |||
| 907 | + | } else { | |||
| 908 | + | r1 = ret.Error(1) | |||
| 909 | + | } | |||
| 910 | + | return r0, r1 | |||
| 911 | + | } | |||
| 912 | + | ||||
| 913 | + | // MockControlPlane_GetAllAttachmentsConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllAttachmentsConfig' | |||
| 914 | + | type MockControlPlane_GetAllAttachmentsConfig_Call struct { | |||
| 915 | + | *mock.Call | |||
| 916 | + | } | |||
| 917 | + | ||||
| 918 | + | // GetAllAttachmentsConfig is a helper method to define mock.On call | |||
| 919 | + | // - ctx context.Context | |||
| 920 | + | func (_e *MockControlPlane_Expecter) GetAllAttachmentsConfig(ctx interface{}) *MockControlPlane_GetAllAttachmentsConfig_Call { | |||
| 921 | + | return &MockControlPlane_GetAllAttachmentsConfig_Call{Call: _e.mock.On("GetAllAttachmentsConfig", ctx)} | |||
| 922 | + | } | |||
| 923 | + | ||||
| 924 | + | func (_c *MockControlPlane_GetAllAttachmentsConfig_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetAllAttachmentsConfig_Call { | |||
| 925 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 926 | + | var arg0 context.Context | |||
| 927 | + | if args[0] != nil { | |||
| 928 | + | arg0 = args[0].(context.Context) | |||
| 929 | + | } | |||
| 930 | + | run( | |||
| 931 | + | arg0, | |||
| 932 | + | ) | |||
| 933 | + | }) | |||
| 934 | + | return _c | |||
| 935 | + | } | |||
| 936 | + | ||||
| 937 | + | func (_c *MockControlPlane_GetAllAttachmentsConfig_Call) Return(stringToStrings map[string][]string, err error) *MockControlPlane_GetAllAttachmentsConfig_Call { | |||
| 938 | + | _c.Call.Return(stringToStrings, err) | |||
| 939 | + | return _c | |||
| 940 | + | } | |||
| 941 | + | ||||
| 942 | + | func (_c *MockControlPlane_GetAllAttachmentsConfig_Call) RunAndReturn(run func(ctx context.Context) (map[string][]string, error)) *MockControlPlane_GetAllAttachmentsConfig_Call { | |||
| 943 | + | _c.Call.Return(run) | |||
| 944 | + | return _c | |||
| 945 | + | } | |||
| 946 | + | ||||
| 947 | + | // GetAttachmentsConfig provides a mock function for the type MockControlPlane | |||
| 948 | + | func (_mock *MockControlPlane) GetAttachmentsConfig(ctx context.Context, domainOrGroup string) ([]string, error) { | |||
| 949 | + | ret := _mock.Called(ctx, domainOrGroup) | |||
| 950 | + | ||||
| 951 | + | if len(ret) == 0 { | |||
| 952 | + | panic("no return value specified for GetAttachmentsConfig") | |||
| 953 | + | } | |||
| 954 | + | ||||
| 955 | + | var r0 []string | |||
| 956 | + | var r1 error | |||
| 957 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { | |||
| 958 | + | return returnFunc(ctx, domainOrGroup) | |||
| 959 | + | } | |||
| 960 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok { | |||
| 961 | + | r0 = returnFunc(ctx, domainOrGroup) | |||
| 962 | + | } else { | |||
| 963 | + | if ret.Get(0) != nil { | |||
| 964 | + | r0 = ret.Get(0).([]string) | |||
| 965 | + | } | |||
| 966 | + | } | |||
| 967 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 968 | + | r1 = returnFunc(ctx, domainOrGroup) | |||
| 969 | + | } else { | |||
| 970 | + | r1 = ret.Error(1) | |||
| 971 | + | } | |||
| 972 | + | return r0, r1 | |||
| 973 | + | } | |||
| 974 | + | ||||
| 975 | + | // MockControlPlane_GetAttachmentsConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAttachmentsConfig' | |||
| 976 | + | type MockControlPlane_GetAttachmentsConfig_Call struct { | |||
| 977 | + | *mock.Call | |||
| 978 | + | } | |||
| 979 | + | ||||
| 980 | + | // GetAttachmentsConfig is a helper method to define mock.On call | |||
| 981 | + | // - ctx context.Context | |||
| 982 | + | // - domainOrGroup string | |||
| 983 | + | func (_e *MockControlPlane_Expecter) GetAttachmentsConfig(ctx interface{}, domainOrGroup interface{}) *MockControlPlane_GetAttachmentsConfig_Call { | |||
| 984 | + | return &MockControlPlane_GetAttachmentsConfig_Call{Call: _e.mock.On("GetAttachmentsConfig", ctx, domainOrGroup)} | |||
| 985 | + | } | |||
| 986 | + | ||||
| 987 | + | func (_c *MockControlPlane_GetAttachmentsConfig_Call) Run(run func(ctx context.Context, domainOrGroup string)) *MockControlPlane_GetAttachmentsConfig_Call { | |||
| 988 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 989 | + | var arg0 context.Context | |||
| 990 | + | if args[0] != nil { | |||
| 991 | + | arg0 = args[0].(context.Context) | |||
| 992 | + | } | |||
| 993 | + | var arg1 string | |||
| 994 | + | if args[1] != nil { | |||
| 995 | + | arg1 = args[1].(string) | |||
| 996 | + | } | |||
| 997 | + | run( | |||
| 998 | + | arg0, | |||
| 999 | + | arg1, | |||
| 1000 | + | ) | |||
| 1001 | + | }) | |||
| 1002 | + | return _c | |||
| 1003 | + | } | |||
| 1004 | + | ||||
| 1005 | + | func (_c *MockControlPlane_GetAttachmentsConfig_Call) Return(strings []string, err error) *MockControlPlane_GetAttachmentsConfig_Call { | |||
| 1006 | + | _c.Call.Return(strings, err) | |||
| 1007 | + | return _c | |||
| 1008 | + | } | |||
| 1009 | + | ||||
| 1010 | + | func (_c *MockControlPlane_GetAttachmentsConfig_Call) RunAndReturn(run func(ctx context.Context, domainOrGroup string) ([]string, error)) *MockControlPlane_GetAttachmentsConfig_Call { | |||
| 1011 | + | _c.Call.Return(run) | |||
| 1012 | + | return _c | |||
| 1013 | + | } | |||
| 1014 | + | ||||
| 1015 | + | // GetAutoRouteAllowedDomains provides a mock function for the type MockControlPlane | |||
| 1016 | + | func (_mock *MockControlPlane) GetAutoRouteAllowedDomains(ctx context.Context) ([]string, error) { | |||
| 1017 | + | ret := _mock.Called(ctx) | |||
| 1018 | + | ||||
| 1019 | + | if len(ret) == 0 { | |||
| 1020 | + | panic("no return value specified for GetAutoRouteAllowedDomains") | |||
| 1021 | + | } | |||
| 1022 | + | ||||
| 1023 | + | var r0 []string | |||
| 1024 | + | var r1 error | |||
| 1025 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { | |||
| 1026 | + | return returnFunc(ctx) | |||
| 1027 | + | } | |||
| 1028 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { | |||
| 1029 | + | r0 = returnFunc(ctx) | |||
| 1030 | + | } else { | |||
| 1031 | + | if ret.Get(0) != nil { | |||
| 1032 | + | r0 = ret.Get(0).([]string) | |||
| 1033 | + | } | |||
| 1034 | + | } | |||
| 1035 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1036 | + | r1 = returnFunc(ctx) | |||
| 1037 | + | } else { | |||
| 1038 | + | r1 = ret.Error(1) | |||
| 1039 | + | } | |||
| 1040 | + | return r0, r1 | |||
| 1041 | + | } | |||
| 1042 | + | ||||
| 1043 | + | // MockControlPlane_GetAutoRouteAllowedDomains_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAutoRouteAllowedDomains' | |||
| 1044 | + | type MockControlPlane_GetAutoRouteAllowedDomains_Call struct { | |||
| 1045 | + | *mock.Call | |||
| 1046 | + | } | |||
| 1047 | + | ||||
| 1048 | + | // GetAutoRouteAllowedDomains is a helper method to define mock.On call | |||
| 1049 | + | // - ctx context.Context | |||
| 1050 | + | func (_e *MockControlPlane_Expecter) GetAutoRouteAllowedDomains(ctx interface{}) *MockControlPlane_GetAutoRouteAllowedDomains_Call { | |||
| 1051 | + | return &MockControlPlane_GetAutoRouteAllowedDomains_Call{Call: _e.mock.On("GetAutoRouteAllowedDomains", ctx)} | |||
| 1052 | + | } | |||
| 1053 | + | ||||
| 1054 | + | func (_c *MockControlPlane_GetAutoRouteAllowedDomains_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetAutoRouteAllowedDomains_Call { | |||
| 1055 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1056 | + | var arg0 context.Context | |||
| 1057 | + | if args[0] != nil { | |||
| 1058 | + | arg0 = args[0].(context.Context) | |||
| 1059 | + | } | |||
| 1060 | + | run( | |||
| 1061 | + | arg0, | |||
| 1062 | + | ) | |||
| 1063 | + | }) | |||
| 1064 | + | return _c | |||
| 1065 | + | } | |||
| 1066 | + | ||||
| 1067 | + | func (_c *MockControlPlane_GetAutoRouteAllowedDomains_Call) Return(strings []string, err error) *MockControlPlane_GetAutoRouteAllowedDomains_Call { | |||
| 1068 | + | _c.Call.Return(strings, err) | |||
| 1069 | + | return _c | |||
| 1070 | + | } | |||
| 1071 | + | ||||
| 1072 | + | func (_c *MockControlPlane_GetAutoRouteAllowedDomains_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockControlPlane_GetAutoRouteAllowedDomains_Call { | |||
| 1073 | + | _c.Call.Return(run) | |||
| 1074 | + | return _c | |||
| 1075 | + | } | |||
| 1076 | + | ||||
| 1077 | + | // GetConfig provides a mock function for the type MockControlPlane | |||
| 1078 | + | func (_mock *MockControlPlane) GetConfig(ctx context.Context) (*remote.Config, error) { | |||
| 1079 | + | ret := _mock.Called(ctx) | |||
| 1080 | + | ||||
| 1081 | + | if len(ret) == 0 { | |||
| 1082 | + | panic("no return value specified for GetConfig") | |||
| 1083 | + | } | |||
| 1084 | + | ||||
| 1085 | + | var r0 *remote.Config | |||
| 1086 | + | var r1 error | |||
| 1087 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*remote.Config, error)); ok { | |||
| 1088 | + | return returnFunc(ctx) | |||
| 1089 | + | } | |||
| 1090 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *remote.Config); ok { | |||
| 1091 | + | r0 = returnFunc(ctx) | |||
| 1092 | + | } else { | |||
| 1093 | + | if ret.Get(0) != nil { | |||
| 1094 | + | r0 = ret.Get(0).(*remote.Config) | |||
| 1095 | + | } | |||
| 1096 | + | } | |||
| 1097 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1098 | + | r1 = returnFunc(ctx) | |||
| 1099 | + | } else { | |||
| 1100 | + | r1 = ret.Error(1) | |||
| 1101 | + | } | |||
| 1102 | + | return r0, r1 | |||
| 1103 | + | } | |||
| 1104 | + | ||||
| 1105 | + | // MockControlPlane_GetConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfig' | |||
| 1106 | + | type MockControlPlane_GetConfig_Call struct { | |||
| 1107 | + | *mock.Call | |||
| 1108 | + | } | |||
| 1109 | + | ||||
| 1110 | + | // GetConfig is a helper method to define mock.On call | |||
| 1111 | + | // - ctx context.Context | |||
| 1112 | + | func (_e *MockControlPlane_Expecter) GetConfig(ctx interface{}) *MockControlPlane_GetConfig_Call { | |||
| 1113 | + | return &MockControlPlane_GetConfig_Call{Call: _e.mock.On("GetConfig", ctx)} | |||
| 1114 | + | } | |||
| 1115 | + | ||||
| 1116 | + | func (_c *MockControlPlane_GetConfig_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetConfig_Call { | |||
| 1117 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1118 | + | var arg0 context.Context | |||
| 1119 | + | if args[0] != nil { | |||
| 1120 | + | arg0 = args[0].(context.Context) | |||
| 1121 | + | } | |||
| 1122 | + | run( | |||
| 1123 | + | arg0, | |||
| 1124 | + | ) | |||
| 1125 | + | }) | |||
| 1126 | + | return _c | |||
| 1127 | + | } | |||
| 1128 | + | ||||
| 1129 | + | func (_c *MockControlPlane_GetConfig_Call) Return(config *remote.Config, err error) *MockControlPlane_GetConfig_Call { | |||
| 1130 | + | _c.Call.Return(config, err) | |||
| 1131 | + | return _c | |||
| 1132 | + | } | |||
| 1133 | + | ||||
| 1134 | + | func (_c *MockControlPlane_GetConfig_Call) RunAndReturn(run func(ctx context.Context) (*remote.Config, error)) *MockControlPlane_GetConfig_Call { | |||
| 1135 | + | _c.Call.Return(run) | |||
| 1136 | + | return _c | |||
| 1137 | + | } | |||
| 1138 | + | ||||
| 1139 | + | // GetContainerLogs provides a mock function for the type MockControlPlane | |||
| 1140 | + | func (_mock *MockControlPlane) GetContainerLogs(ctx context.Context, logDomain string, lines int) ([]string, error) { | |||
| 1141 | + | ret := _mock.Called(ctx, logDomain, lines) | |||
| 1142 | + | ||||
| 1143 | + | if len(ret) == 0 { | |||
| 1144 | + | panic("no return value specified for GetContainerLogs") | |||
| 1145 | + | } | |||
| 1146 | + | ||||
| 1147 | + | var r0 []string | |||
| 1148 | + | var r1 error | |||
| 1149 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) ([]string, error)); ok { | |||
| 1150 | + | return returnFunc(ctx, logDomain, lines) | |||
| 1151 | + | } | |||
| 1152 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) []string); ok { | |||
| 1153 | + | r0 = returnFunc(ctx, logDomain, lines) | |||
| 1154 | + | } else { | |||
| 1155 | + | if ret.Get(0) != nil { | |||
| 1156 | + | r0 = ret.Get(0).([]string) | |||
| 1157 | + | } | |||
| 1158 | + | } | |||
| 1159 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, int) error); ok { | |||
| 1160 | + | r1 = returnFunc(ctx, logDomain, lines) | |||
| 1161 | + | } else { | |||
| 1162 | + | r1 = ret.Error(1) | |||
| 1163 | + | } | |||
| 1164 | + | return r0, r1 | |||
| 1165 | + | } | |||
| 1166 | + | ||||
| 1167 | + | // MockControlPlane_GetContainerLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerLogs' | |||
| 1168 | + | type MockControlPlane_GetContainerLogs_Call struct { | |||
| 1169 | + | *mock.Call | |||
| 1170 | + | } | |||
| 1171 | + | ||||
| 1172 | + | // GetContainerLogs is a helper method to define mock.On call | |||
| 1173 | + | // - ctx context.Context | |||
| 1174 | + | // - logDomain string | |||
| 1175 | + | // - lines int | |||
| 1176 | + | func (_e *MockControlPlane_Expecter) GetContainerLogs(ctx interface{}, logDomain interface{}, lines interface{}) *MockControlPlane_GetContainerLogs_Call { | |||
| 1177 | + | return &MockControlPlane_GetContainerLogs_Call{Call: _e.mock.On("GetContainerLogs", ctx, logDomain, lines)} | |||
| 1178 | + | } | |||
| 1179 | + | ||||
| 1180 | + | func (_c *MockControlPlane_GetContainerLogs_Call) Run(run func(ctx context.Context, logDomain string, lines int)) *MockControlPlane_GetContainerLogs_Call { | |||
| 1181 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1182 | + | var arg0 context.Context | |||
| 1183 | + | if args[0] != nil { | |||
| 1184 | + | arg0 = args[0].(context.Context) | |||
| 1185 | + | } | |||
| 1186 | + | var arg1 string | |||
| 1187 | + | if args[1] != nil { | |||
| 1188 | + | arg1 = args[1].(string) | |||
| 1189 | + | } | |||
| 1190 | + | var arg2 int | |||
| 1191 | + | if args[2] != nil { | |||
| 1192 | + | arg2 = args[2].(int) | |||
| 1193 | + | } | |||
| 1194 | + | run( | |||
| 1195 | + | arg0, | |||
| 1196 | + | arg1, | |||
| 1197 | + | arg2, | |||
| 1198 | + | ) | |||
| 1199 | + | }) | |||
| 1200 | + | return _c | |||
| 1201 | + | } | |||
| 1202 | + | ||||
| 1203 | + | func (_c *MockControlPlane_GetContainerLogs_Call) Return(strings []string, err error) *MockControlPlane_GetContainerLogs_Call { | |||
| 1204 | + | _c.Call.Return(strings, err) | |||
| 1205 | + | return _c | |||
| 1206 | + | } | |||
| 1207 | + | ||||
| 1208 | + | func (_c *MockControlPlane_GetContainerLogs_Call) RunAndReturn(run func(ctx context.Context, logDomain string, lines int) ([]string, error)) *MockControlPlane_GetContainerLogs_Call { | |||
| 1209 | + | _c.Call.Return(run) | |||
| 1210 | + | return _c | |||
| 1211 | + | } | |||
| 1212 | + | ||||
| 1213 | + | // GetHealth provides a mock function for the type MockControlPlane | |||
| 1214 | + | func (_mock *MockControlPlane) GetHealth(ctx context.Context) (map[string]*remote.RouteHealth, error) { | |||
| 1215 | + | ret := _mock.Called(ctx) | |||
| 1216 | + | ||||
| 1217 | + | if len(ret) == 0 { | |||
| 1218 | + | panic("no return value specified for GetHealth") | |||
| 1219 | + | } | |||
| 1220 | + | ||||
| 1221 | + | var r0 map[string]*remote.RouteHealth | |||
| 1222 | + | var r1 error | |||
| 1223 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (map[string]*remote.RouteHealth, error)); ok { | |||
| 1224 | + | return returnFunc(ctx) | |||
| 1225 | + | } | |||
| 1226 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) map[string]*remote.RouteHealth); ok { | |||
| 1227 | + | r0 = returnFunc(ctx) | |||
| 1228 | + | } else { | |||
| 1229 | + | if ret.Get(0) != nil { | |||
| 1230 | + | r0 = ret.Get(0).(map[string]*remote.RouteHealth) | |||
| 1231 | + | } | |||
| 1232 | + | } | |||
| 1233 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1234 | + | r1 = returnFunc(ctx) | |||
| 1235 | + | } else { | |||
| 1236 | + | r1 = ret.Error(1) | |||
| 1237 | + | } | |||
| 1238 | + | return r0, r1 | |||
| 1239 | + | } | |||
| 1240 | + | ||||
| 1241 | + | // MockControlPlane_GetHealth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHealth' | |||
| 1242 | + | type MockControlPlane_GetHealth_Call struct { | |||
| 1243 | + | *mock.Call | |||
| 1244 | + | } | |||
| 1245 | + | ||||
| 1246 | + | // GetHealth is a helper method to define mock.On call | |||
| 1247 | + | // - ctx context.Context | |||
| 1248 | + | func (_e *MockControlPlane_Expecter) GetHealth(ctx interface{}) *MockControlPlane_GetHealth_Call { | |||
| 1249 | + | return &MockControlPlane_GetHealth_Call{Call: _e.mock.On("GetHealth", ctx)} | |||
| 1250 | + | } | |||
| 1251 | + | ||||
| 1252 | + | func (_c *MockControlPlane_GetHealth_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetHealth_Call { | |||
| 1253 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1254 | + | var arg0 context.Context | |||
| 1255 | + | if args[0] != nil { | |||
| 1256 | + | arg0 = args[0].(context.Context) | |||
| 1257 | + | } | |||
| 1258 | + | run( | |||
| 1259 | + | arg0, | |||
| 1260 | + | ) | |||
| 1261 | + | }) | |||
| 1262 | + | return _c | |||
| 1263 | + | } | |||
| 1264 | + | ||||
| 1265 | + | func (_c *MockControlPlane_GetHealth_Call) Return(stringToRouteHealth map[string]*remote.RouteHealth, err error) *MockControlPlane_GetHealth_Call { | |||
| 1266 | + | _c.Call.Return(stringToRouteHealth, err) | |||
| 1267 | + | return _c | |||
| 1268 | + | } | |||
| 1269 | + | ||||
| 1270 | + | func (_c *MockControlPlane_GetHealth_Call) RunAndReturn(run func(ctx context.Context) (map[string]*remote.RouteHealth, error)) *MockControlPlane_GetHealth_Call { | |||
| 1271 | + | _c.Call.Return(run) | |||
| 1272 | + | return _c | |||
| 1273 | + | } | |||
| 1274 | + | ||||
| 1275 | + | // GetProcessLogs provides a mock function for the type MockControlPlane | |||
| 1276 | + | func (_mock *MockControlPlane) GetProcessLogs(ctx context.Context, lines int) ([]string, error) { | |||
| 1277 | + | ret := _mock.Called(ctx, lines) | |||
| 1278 | + | ||||
| 1279 | + | if len(ret) == 0 { | |||
| 1280 | + | panic("no return value specified for GetProcessLogs") | |||
| 1281 | + | } | |||
| 1282 | + | ||||
| 1283 | + | var r0 []string | |||
| 1284 | + | var r1 error | |||
| 1285 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]string, error)); ok { | |||
| 1286 | + | return returnFunc(ctx, lines) | |||
| 1287 | + | } | |||
| 1288 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) []string); ok { | |||
| 1289 | + | r0 = returnFunc(ctx, lines) | |||
| 1290 | + | } else { | |||
| 1291 | + | if ret.Get(0) != nil { | |||
| 1292 | + | r0 = ret.Get(0).([]string) | |||
| 1293 | + | } | |||
| 1294 | + | } | |||
| 1295 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |||
| 1296 | + | r1 = returnFunc(ctx, lines) | |||
| 1297 | + | } else { | |||
| 1298 | + | r1 = ret.Error(1) | |||
| 1299 | + | } | |||
| 1300 | + | return r0, r1 | |||
| 1301 | + | } | |||
| 1302 | + | ||||
| 1303 | + | // MockControlPlane_GetProcessLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProcessLogs' | |||
| 1304 | + | type MockControlPlane_GetProcessLogs_Call struct { | |||
| 1305 | + | *mock.Call | |||
| 1306 | + | } | |||
| 1307 | + | ||||
| 1308 | + | // GetProcessLogs is a helper method to define mock.On call | |||
| 1309 | + | // - ctx context.Context | |||
| 1310 | + | // - lines int | |||
| 1311 | + | func (_e *MockControlPlane_Expecter) GetProcessLogs(ctx interface{}, lines interface{}) *MockControlPlane_GetProcessLogs_Call { | |||
| 1312 | + | return &MockControlPlane_GetProcessLogs_Call{Call: _e.mock.On("GetProcessLogs", ctx, lines)} | |||
| 1313 | + | } | |||
| 1314 | + | ||||
| 1315 | + | func (_c *MockControlPlane_GetProcessLogs_Call) Run(run func(ctx context.Context, lines int)) *MockControlPlane_GetProcessLogs_Call { | |||
| 1316 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1317 | + | var arg0 context.Context | |||
| 1318 | + | if args[0] != nil { | |||
| 1319 | + | arg0 = args[0].(context.Context) | |||
| 1320 | + | } | |||
| 1321 | + | var arg1 int | |||
| 1322 | + | if args[1] != nil { | |||
| 1323 | + | arg1 = args[1].(int) | |||
| 1324 | + | } | |||
| 1325 | + | run( | |||
| 1326 | + | arg0, | |||
| 1327 | + | arg1, | |||
| 1328 | + | ) | |||
| 1329 | + | }) | |||
| 1330 | + | return _c | |||
| 1331 | + | } | |||
| 1332 | + | ||||
| 1333 | + | func (_c *MockControlPlane_GetProcessLogs_Call) Return(strings []string, err error) *MockControlPlane_GetProcessLogs_Call { | |||
| 1334 | + | _c.Call.Return(strings, err) | |||
| 1335 | + | return _c | |||
| 1336 | + | } | |||
| 1337 | + | ||||
| 1338 | + | func (_c *MockControlPlane_GetProcessLogs_Call) RunAndReturn(run func(ctx context.Context, lines int) ([]string, error)) *MockControlPlane_GetProcessLogs_Call { | |||
| 1339 | + | _c.Call.Return(run) | |||
| 1340 | + | return _c | |||
| 1341 | + | } | |||
| 1342 | + | ||||
| 1343 | + | // GetRoute provides a mock function for the type MockControlPlane | |||
| 1344 | + | func (_mock *MockControlPlane) GetRoute(ctx context.Context, routeDomain string) (*domain.Route, error) { | |||
| 1345 | + | ret := _mock.Called(ctx, routeDomain) | |||
| 1346 | + | ||||
| 1347 | + | if len(ret) == 0 { | |||
| 1348 | + | panic("no return value specified for GetRoute") | |||
| 1349 | + | } | |||
| 1350 | + | ||||
| 1351 | + | var r0 *domain.Route | |||
| 1352 | + | var r1 error | |||
| 1353 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*domain.Route, error)); ok { | |||
| 1354 | + | return returnFunc(ctx, routeDomain) | |||
| 1355 | + | } | |||
| 1356 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *domain.Route); ok { | |||
| 1357 | + | r0 = returnFunc(ctx, routeDomain) | |||
| 1358 | + | } else { | |||
| 1359 | + | if ret.Get(0) != nil { | |||
| 1360 | + | r0 = ret.Get(0).(*domain.Route) | |||
| 1361 | + | } | |||
| 1362 | + | } | |||
| 1363 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 1364 | + | r1 = returnFunc(ctx, routeDomain) | |||
| 1365 | + | } else { | |||
| 1366 | + | r1 = ret.Error(1) | |||
| 1367 | + | } | |||
| 1368 | + | return r0, r1 | |||
| 1369 | + | } | |||
| 1370 | + | ||||
| 1371 | + | // MockControlPlane_GetRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRoute' | |||
| 1372 | + | type MockControlPlane_GetRoute_Call struct { | |||
| 1373 | + | *mock.Call | |||
| 1374 | + | } | |||
| 1375 | + | ||||
| 1376 | + | // GetRoute is a helper method to define mock.On call | |||
| 1377 | + | // - ctx context.Context | |||
| 1378 | + | // - routeDomain string | |||
| 1379 | + | func (_e *MockControlPlane_Expecter) GetRoute(ctx interface{}, routeDomain interface{}) *MockControlPlane_GetRoute_Call { | |||
| 1380 | + | return &MockControlPlane_GetRoute_Call{Call: _e.mock.On("GetRoute", ctx, routeDomain)} | |||
| 1381 | + | } | |||
| 1382 | + | ||||
| 1383 | + | func (_c *MockControlPlane_GetRoute_Call) Run(run func(ctx context.Context, routeDomain string)) *MockControlPlane_GetRoute_Call { | |||
| 1384 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1385 | + | var arg0 context.Context | |||
| 1386 | + | if args[0] != nil { | |||
| 1387 | + | arg0 = args[0].(context.Context) | |||
| 1388 | + | } | |||
| 1389 | + | var arg1 string | |||
| 1390 | + | if args[1] != nil { | |||
| 1391 | + | arg1 = args[1].(string) | |||
| 1392 | + | } | |||
| 1393 | + | run( | |||
| 1394 | + | arg0, | |||
| 1395 | + | arg1, | |||
| 1396 | + | ) | |||
| 1397 | + | }) | |||
| 1398 | + | return _c | |||
| 1399 | + | } | |||
| 1400 | + | ||||
| 1401 | + | func (_c *MockControlPlane_GetRoute_Call) Return(route *domain.Route, err error) *MockControlPlane_GetRoute_Call { | |||
| 1402 | + | _c.Call.Return(route, err) | |||
| 1403 | + | return _c | |||
| 1404 | + | } | |||
| 1405 | + | ||||
| 1406 | + | func (_c *MockControlPlane_GetRoute_Call) RunAndReturn(run func(ctx context.Context, routeDomain string) (*domain.Route, error)) *MockControlPlane_GetRoute_Call { | |||
| 1407 | + | _c.Call.Return(run) | |||
| 1408 | + | return _c | |||
| 1409 | + | } | |||
| 1410 | + | ||||
| 1411 | + | // GetStatus provides a mock function for the type MockControlPlane | |||
| 1412 | + | func (_mock *MockControlPlane) GetStatus(ctx context.Context) (*remote.Status, error) { | |||
| 1413 | + | ret := _mock.Called(ctx) | |||
| 1414 | + | ||||
| 1415 | + | if len(ret) == 0 { | |||
| 1416 | + | panic("no return value specified for GetStatus") | |||
| 1417 | + | } | |||
| 1418 | + | ||||
| 1419 | + | var r0 *remote.Status | |||
| 1420 | + | var r1 error | |||
| 1421 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*remote.Status, error)); ok { | |||
| 1422 | + | return returnFunc(ctx) | |||
| 1423 | + | } | |||
| 1424 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *remote.Status); ok { | |||
| 1425 | + | r0 = returnFunc(ctx) | |||
| 1426 | + | } else { | |||
| 1427 | + | if ret.Get(0) != nil { | |||
| 1428 | + | r0 = ret.Get(0).(*remote.Status) | |||
| 1429 | + | } | |||
| 1430 | + | } | |||
| 1431 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1432 | + | r1 = returnFunc(ctx) | |||
| 1433 | + | } else { | |||
| 1434 | + | r1 = ret.Error(1) | |||
| 1435 | + | } | |||
| 1436 | + | return r0, r1 | |||
| 1437 | + | } | |||
| 1438 | + | ||||
| 1439 | + | // MockControlPlane_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus' | |||
| 1440 | + | type MockControlPlane_GetStatus_Call struct { | |||
| 1441 | + | *mock.Call | |||
| 1442 | + | } | |||
| 1443 | + | ||||
| 1444 | + | // GetStatus is a helper method to define mock.On call | |||
| 1445 | + | // - ctx context.Context | |||
| 1446 | + | func (_e *MockControlPlane_Expecter) GetStatus(ctx interface{}) *MockControlPlane_GetStatus_Call { | |||
| 1447 | + | return &MockControlPlane_GetStatus_Call{Call: _e.mock.On("GetStatus", ctx)} | |||
| 1448 | + | } | |||
| 1449 | + | ||||
| 1450 | + | func (_c *MockControlPlane_GetStatus_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetStatus_Call { | |||
| 1451 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1452 | + | var arg0 context.Context | |||
| 1453 | + | if args[0] != nil { | |||
| 1454 | + | arg0 = args[0].(context.Context) | |||
| 1455 | + | } | |||
| 1456 | + | run( | |||
| 1457 | + | arg0, | |||
| 1458 | + | ) | |||
| 1459 | + | }) | |||
| 1460 | + | return _c | |||
| 1461 | + | } | |||
| 1462 | + | ||||
| 1463 | + | func (_c *MockControlPlane_GetStatus_Call) Return(status *remote.Status, err error) *MockControlPlane_GetStatus_Call { | |||
| 1464 | + | _c.Call.Return(status, err) | |||
| 1465 | + | return _c | |||
| 1466 | + | } | |||
| 1467 | + | ||||
| 1468 | + | func (_c *MockControlPlane_GetStatus_Call) RunAndReturn(run func(ctx context.Context) (*remote.Status, error)) *MockControlPlane_GetStatus_Call { | |||
| 1469 | + | _c.Call.Return(run) | |||
| 1470 | + | return _c | |||
| 1471 | + | } | |||
| 1472 | + | ||||
| 1473 | + | // GetTLSStatus provides a mock function for the type MockControlPlane | |||
| 1474 | + | func (_mock *MockControlPlane) GetTLSStatus(ctx context.Context) (*dto.TLSStatusResponse, error) { | |||
| 1475 | + | ret := _mock.Called(ctx) | |||
| 1476 | + | ||||
| 1477 | + | if len(ret) == 0 { | |||
| 1478 | + | panic("no return value specified for GetTLSStatus") | |||
| 1479 | + | } | |||
| 1480 | + | ||||
| 1481 | + | var r0 *dto.TLSStatusResponse | |||
| 1482 | + | var r1 error | |||
| 1483 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*dto.TLSStatusResponse, error)); ok { | |||
| 1484 | + | return returnFunc(ctx) | |||
| 1485 | + | } | |||
| 1486 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *dto.TLSStatusResponse); ok { | |||
| 1487 | + | r0 = returnFunc(ctx) | |||
| 1488 | + | } else { | |||
| 1489 | + | if ret.Get(0) != nil { | |||
| 1490 | + | r0 = ret.Get(0).(*dto.TLSStatusResponse) | |||
| 1491 | + | } | |||
| 1492 | + | } | |||
| 1493 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1494 | + | r1 = returnFunc(ctx) | |||
| 1495 | + | } else { | |||
| 1496 | + | r1 = ret.Error(1) | |||
| 1497 | + | } | |||
| 1498 | + | return r0, r1 | |||
| 1499 | + | } | |||
| 1500 | + | ||||
| 1501 | + | // MockControlPlane_GetTLSStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTLSStatus' | |||
| 1502 | + | type MockControlPlane_GetTLSStatus_Call struct { | |||
| 1503 | + | *mock.Call | |||
| 1504 | + | } | |||
| 1505 | + | ||||
| 1506 | + | // GetTLSStatus is a helper method to define mock.On call | |||
| 1507 | + | // - ctx context.Context | |||
| 1508 | + | func (_e *MockControlPlane_Expecter) GetTLSStatus(ctx interface{}) *MockControlPlane_GetTLSStatus_Call { | |||
| 1509 | + | return &MockControlPlane_GetTLSStatus_Call{Call: _e.mock.On("GetTLSStatus", ctx)} | |||
| 1510 | + | } | |||
| 1511 | + | ||||
| 1512 | + | func (_c *MockControlPlane_GetTLSStatus_Call) Run(run func(ctx context.Context)) *MockControlPlane_GetTLSStatus_Call { | |||
| 1513 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1514 | + | var arg0 context.Context | |||
| 1515 | + | if args[0] != nil { | |||
| 1516 | + | arg0 = args[0].(context.Context) | |||
| 1517 | + | } | |||
| 1518 | + | run( | |||
| 1519 | + | arg0, | |||
| 1520 | + | ) | |||
| 1521 | + | }) | |||
| 1522 | + | return _c | |||
| 1523 | + | } | |||
| 1524 | + | ||||
| 1525 | + | func (_c *MockControlPlane_GetTLSStatus_Call) Return(tLSStatusResponse *dto.TLSStatusResponse, err error) *MockControlPlane_GetTLSStatus_Call { | |||
| 1526 | + | _c.Call.Return(tLSStatusResponse, err) | |||
| 1527 | + | return _c | |||
| 1528 | + | } | |||
| 1529 | + | ||||
| 1530 | + | func (_c *MockControlPlane_GetTLSStatus_Call) RunAndReturn(run func(ctx context.Context) (*dto.TLSStatusResponse, error)) *MockControlPlane_GetTLSStatus_Call { | |||
| 1531 | + | _c.Call.Return(run) | |||
| 1532 | + | return _c | |||
| 1533 | + | } | |||
| 1534 | + | ||||
| 1535 | + | // ListBackups provides a mock function for the type MockControlPlane | |||
| 1536 | + | func (_mock *MockControlPlane) ListBackups(ctx context.Context, backupDomain string) ([]dto.BackupJob, error) { | |||
| 1537 | + | ret := _mock.Called(ctx, backupDomain) | |||
| 1538 | + | ||||
| 1539 | + | if len(ret) == 0 { | |||
| 1540 | + | panic("no return value specified for ListBackups") | |||
| 1541 | + | } | |||
| 1542 | + | ||||
| 1543 | + | var r0 []dto.BackupJob | |||
| 1544 | + | var r1 error | |||
| 1545 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]dto.BackupJob, error)); ok { | |||
| 1546 | + | return returnFunc(ctx, backupDomain) | |||
| 1547 | + | } | |||
| 1548 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []dto.BackupJob); ok { | |||
| 1549 | + | r0 = returnFunc(ctx, backupDomain) | |||
| 1550 | + | } else { | |||
| 1551 | + | if ret.Get(0) != nil { | |||
| 1552 | + | r0 = ret.Get(0).([]dto.BackupJob) | |||
| 1553 | + | } | |||
| 1554 | + | } | |||
| 1555 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 1556 | + | r1 = returnFunc(ctx, backupDomain) | |||
| 1557 | + | } else { | |||
| 1558 | + | r1 = ret.Error(1) | |||
| 1559 | + | } | |||
| 1560 | + | return r0, r1 | |||
| 1561 | + | } | |||
| 1562 | + | ||||
| 1563 | + | // MockControlPlane_ListBackups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBackups' | |||
| 1564 | + | type MockControlPlane_ListBackups_Call struct { | |||
| 1565 | + | *mock.Call | |||
| 1566 | + | } | |||
| 1567 | + | ||||
| 1568 | + | // ListBackups is a helper method to define mock.On call | |||
| 1569 | + | // - ctx context.Context | |||
| 1570 | + | // - backupDomain string | |||
| 1571 | + | func (_e *MockControlPlane_Expecter) ListBackups(ctx interface{}, backupDomain interface{}) *MockControlPlane_ListBackups_Call { | |||
| 1572 | + | return &MockControlPlane_ListBackups_Call{Call: _e.mock.On("ListBackups", ctx, backupDomain)} | |||
| 1573 | + | } | |||
| 1574 | + | ||||
| 1575 | + | func (_c *MockControlPlane_ListBackups_Call) Run(run func(ctx context.Context, backupDomain string)) *MockControlPlane_ListBackups_Call { | |||
| 1576 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1577 | + | var arg0 context.Context | |||
| 1578 | + | if args[0] != nil { | |||
| 1579 | + | arg0 = args[0].(context.Context) | |||
| 1580 | + | } | |||
| 1581 | + | var arg1 string | |||
| 1582 | + | if args[1] != nil { | |||
| 1583 | + | arg1 = args[1].(string) | |||
| 1584 | + | } | |||
| 1585 | + | run( | |||
| 1586 | + | arg0, | |||
| 1587 | + | arg1, | |||
| 1588 | + | ) | |||
| 1589 | + | }) | |||
| 1590 | + | return _c | |||
| 1591 | + | } | |||
| 1592 | + | ||||
| 1593 | + | func (_c *MockControlPlane_ListBackups_Call) Return(backupJobs []dto.BackupJob, err error) *MockControlPlane_ListBackups_Call { | |||
| 1594 | + | _c.Call.Return(backupJobs, err) | |||
| 1595 | + | return _c | |||
| 1596 | + | } | |||
| 1597 | + | ||||
| 1598 | + | func (_c *MockControlPlane_ListBackups_Call) RunAndReturn(run func(ctx context.Context, backupDomain string) ([]dto.BackupJob, error)) *MockControlPlane_ListBackups_Call { | |||
| 1599 | + | _c.Call.Return(run) | |||
| 1600 | + | return _c | |||
| 1601 | + | } | |||
| 1602 | + | ||||
| 1603 | + | // ListNetworks provides a mock function for the type MockControlPlane | |||
| 1604 | + | func (_mock *MockControlPlane) ListNetworks(ctx context.Context) ([]*domain.NetworkInfo, error) { | |||
| 1605 | + | ret := _mock.Called(ctx) | |||
| 1606 | + | ||||
| 1607 | + | if len(ret) == 0 { | |||
| 1608 | + | panic("no return value specified for ListNetworks") | |||
| 1609 | + | } | |||
| 1610 | + | ||||
| 1611 | + | var r0 []*domain.NetworkInfo | |||
| 1612 | + | var r1 error | |||
| 1613 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*domain.NetworkInfo, error)); ok { | |||
| 1614 | + | return returnFunc(ctx) | |||
| 1615 | + | } | |||
| 1616 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*domain.NetworkInfo); ok { | |||
| 1617 | + | r0 = returnFunc(ctx) | |||
| 1618 | + | } else { | |||
| 1619 | + | if ret.Get(0) != nil { | |||
| 1620 | + | r0 = ret.Get(0).([]*domain.NetworkInfo) | |||
| 1621 | + | } | |||
| 1622 | + | } | |||
| 1623 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1624 | + | r1 = returnFunc(ctx) | |||
| 1625 | + | } else { | |||
| 1626 | + | r1 = ret.Error(1) | |||
| 1627 | + | } | |||
| 1628 | + | return r0, r1 | |||
| 1629 | + | } | |||
| 1630 | + | ||||
| 1631 | + | // MockControlPlane_ListNetworks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNetworks' | |||
| 1632 | + | type MockControlPlane_ListNetworks_Call struct { | |||
| 1633 | + | *mock.Call | |||
| 1634 | + | } | |||
| 1635 | + | ||||
| 1636 | + | // ListNetworks is a helper method to define mock.On call | |||
| 1637 | + | // - ctx context.Context | |||
| 1638 | + | func (_e *MockControlPlane_Expecter) ListNetworks(ctx interface{}) *MockControlPlane_ListNetworks_Call { | |||
| 1639 | + | return &MockControlPlane_ListNetworks_Call{Call: _e.mock.On("ListNetworks", ctx)} | |||
| 1640 | + | } | |||
| 1641 | + | ||||
| 1642 | + | func (_c *MockControlPlane_ListNetworks_Call) Run(run func(ctx context.Context)) *MockControlPlane_ListNetworks_Call { | |||
| 1643 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1644 | + | var arg0 context.Context | |||
| 1645 | + | if args[0] != nil { | |||
| 1646 | + | arg0 = args[0].(context.Context) | |||
| 1647 | + | } | |||
| 1648 | + | run( | |||
| 1649 | + | arg0, | |||
| 1650 | + | ) | |||
| 1651 | + | }) | |||
| 1652 | + | return _c | |||
| 1653 | + | } | |||
| 1654 | + | ||||
| 1655 | + | func (_c *MockControlPlane_ListNetworks_Call) Return(networkInfos []*domain.NetworkInfo, err error) *MockControlPlane_ListNetworks_Call { | |||
| 1656 | + | _c.Call.Return(networkInfos, err) | |||
| 1657 | + | return _c | |||
| 1658 | + | } | |||
| 1659 | + | ||||
| 1660 | + | func (_c *MockControlPlane_ListNetworks_Call) RunAndReturn(run func(ctx context.Context) ([]*domain.NetworkInfo, error)) *MockControlPlane_ListNetworks_Call { | |||
| 1661 | + | _c.Call.Return(run) | |||
| 1662 | + | return _c | |||
| 1663 | + | } | |||
| 1664 | + | ||||
| 1665 | + | // ListOrphanedAttachments provides a mock function for the type MockControlPlane | |||
| 1666 | + | func (_mock *MockControlPlane) ListOrphanedAttachments(ctx context.Context) ([]domain.CleanupAttachment, error) { | |||
| 1667 | + | ret := _mock.Called(ctx) | |||
| 1668 | + | ||||
| 1669 | + | if len(ret) == 0 { | |||
| 1670 | + | panic("no return value specified for ListOrphanedAttachments") | |||
| 1671 | + | } | |||
| 1672 | + | ||||
| 1673 | + | var r0 []domain.CleanupAttachment | |||
| 1674 | + | var r1 error | |||
| 1675 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.CleanupAttachment, error)); ok { | |||
| 1676 | + | return returnFunc(ctx) | |||
| 1677 | + | } | |||
| 1678 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.CleanupAttachment); ok { | |||
| 1679 | + | r0 = returnFunc(ctx) | |||
| 1680 | + | } else { | |||
| 1681 | + | if ret.Get(0) != nil { | |||
| 1682 | + | r0 = ret.Get(0).([]domain.CleanupAttachment) | |||
| 1683 | + | } | |||
| 1684 | + | } | |||
| 1685 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1686 | + | r1 = returnFunc(ctx) | |||
| 1687 | + | } else { | |||
| 1688 | + | r1 = ret.Error(1) | |||
| 1689 | + | } | |||
| 1690 | + | return r0, r1 | |||
| 1691 | + | } | |||
| 1692 | + | ||||
| 1693 | + | // MockControlPlane_ListOrphanedAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListOrphanedAttachments' | |||
| 1694 | + | type MockControlPlane_ListOrphanedAttachments_Call struct { | |||
| 1695 | + | *mock.Call | |||
| 1696 | + | } | |||
| 1697 | + | ||||
| 1698 | + | // ListOrphanedAttachments is a helper method to define mock.On call | |||
| 1699 | + | // - ctx context.Context | |||
| 1700 | + | func (_e *MockControlPlane_Expecter) ListOrphanedAttachments(ctx interface{}) *MockControlPlane_ListOrphanedAttachments_Call { | |||
| 1701 | + | return &MockControlPlane_ListOrphanedAttachments_Call{Call: _e.mock.On("ListOrphanedAttachments", ctx)} | |||
| 1702 | + | } | |||
| 1703 | + | ||||
| 1704 | + | func (_c *MockControlPlane_ListOrphanedAttachments_Call) Run(run func(ctx context.Context)) *MockControlPlane_ListOrphanedAttachments_Call { | |||
| 1705 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1706 | + | var arg0 context.Context | |||
| 1707 | + | if args[0] != nil { | |||
| 1708 | + | arg0 = args[0].(context.Context) | |||
| 1709 | + | } | |||
| 1710 | + | run( | |||
| 1711 | + | arg0, | |||
| 1712 | + | ) | |||
| 1713 | + | }) | |||
| 1714 | + | return _c | |||
| 1715 | + | } | |||
| 1716 | + | ||||
| 1717 | + | func (_c *MockControlPlane_ListOrphanedAttachments_Call) Return(cleanupAttachments []domain.CleanupAttachment, err error) *MockControlPlane_ListOrphanedAttachments_Call { | |||
| 1718 | + | _c.Call.Return(cleanupAttachments, err) | |||
| 1719 | + | return _c | |||
| 1720 | + | } | |||
| 1721 | + | ||||
| 1722 | + | func (_c *MockControlPlane_ListOrphanedAttachments_Call) RunAndReturn(run func(ctx context.Context) ([]domain.CleanupAttachment, error)) *MockControlPlane_ListOrphanedAttachments_Call { | |||
| 1723 | + | _c.Call.Return(run) | |||
| 1724 | + | return _c | |||
| 1725 | + | } | |||
| 1726 | + | ||||
| 1727 | + | // ListRoutesWithDetails provides a mock function for the type MockControlPlane | |||
| 1728 | + | func (_mock *MockControlPlane) ListRoutesWithDetails(ctx context.Context) ([]remote.RouteInfo, error) { | |||
| 1729 | + | ret := _mock.Called(ctx) | |||
| 1730 | + | ||||
| 1731 | + | if len(ret) == 0 { | |||
| 1732 | + | panic("no return value specified for ListRoutesWithDetails") | |||
| 1733 | + | } | |||
| 1734 | + | ||||
| 1735 | + | var r0 []remote.RouteInfo | |||
| 1736 | + | var r1 error | |||
| 1737 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]remote.RouteInfo, error)); ok { | |||
| 1738 | + | return returnFunc(ctx) | |||
| 1739 | + | } | |||
| 1740 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []remote.RouteInfo); ok { | |||
| 1741 | + | r0 = returnFunc(ctx) | |||
| 1742 | + | } else { | |||
| 1743 | + | if ret.Get(0) != nil { | |||
| 1744 | + | r0 = ret.Get(0).([]remote.RouteInfo) | |||
| 1745 | + | } | |||
| 1746 | + | } | |||
| 1747 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1748 | + | r1 = returnFunc(ctx) | |||
| 1749 | + | } else { | |||
| 1750 | + | r1 = ret.Error(1) | |||
| 1751 | + | } | |||
| 1752 | + | return r0, r1 | |||
| 1753 | + | } | |||
| 1754 | + | ||||
| 1755 | + | // MockControlPlane_ListRoutesWithDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRoutesWithDetails' | |||
| 1756 | + | type MockControlPlane_ListRoutesWithDetails_Call struct { | |||
| 1757 | + | *mock.Call | |||
| 1758 | + | } | |||
| 1759 | + | ||||
| 1760 | + | // ListRoutesWithDetails is a helper method to define mock.On call | |||
| 1761 | + | // - ctx context.Context | |||
| 1762 | + | func (_e *MockControlPlane_Expecter) ListRoutesWithDetails(ctx interface{}) *MockControlPlane_ListRoutesWithDetails_Call { | |||
| 1763 | + | return &MockControlPlane_ListRoutesWithDetails_Call{Call: _e.mock.On("ListRoutesWithDetails", ctx)} | |||
| 1764 | + | } | |||
| 1765 | + | ||||
| 1766 | + | func (_c *MockControlPlane_ListRoutesWithDetails_Call) Run(run func(ctx context.Context)) *MockControlPlane_ListRoutesWithDetails_Call { | |||
| 1767 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1768 | + | var arg0 context.Context | |||
| 1769 | + | if args[0] != nil { | |||
| 1770 | + | arg0 = args[0].(context.Context) | |||
| 1771 | + | } | |||
| 1772 | + | run( | |||
| 1773 | + | arg0, | |||
| 1774 | + | ) | |||
| 1775 | + | }) | |||
| 1776 | + | return _c | |||
| 1777 | + | } | |||
| 1778 | + | ||||
| 1779 | + | func (_c *MockControlPlane_ListRoutesWithDetails_Call) Return(vs []remote.RouteInfo, err error) *MockControlPlane_ListRoutesWithDetails_Call { | |||
| 1780 | + | _c.Call.Return(vs, err) | |||
| 1781 | + | return _c | |||
| 1782 | + | } | |||
| 1783 | + | ||||
| 1784 | + | func (_c *MockControlPlane_ListRoutesWithDetails_Call) RunAndReturn(run func(ctx context.Context) ([]remote.RouteInfo, error)) *MockControlPlane_ListRoutesWithDetails_Call { | |||
| 1785 | + | _c.Call.Return(run) | |||
| 1786 | + | return _c | |||
| 1787 | + | } | |||
| 1788 | + | ||||
| 1789 | + | // ListSecretsWithAttachments provides a mock function for the type MockControlPlane | |||
| 1790 | + | func (_mock *MockControlPlane) ListSecretsWithAttachments(ctx context.Context, secretDomain string) (*remote.SecretsListResult, error) { | |||
| 1791 | + | ret := _mock.Called(ctx, secretDomain) | |||
| 1792 | + | ||||
| 1793 | + | if len(ret) == 0 { | |||
| 1794 | + | panic("no return value specified for ListSecretsWithAttachments") | |||
| 1795 | + | } | |||
| 1796 | + | ||||
| 1797 | + | var r0 *remote.SecretsListResult | |||
| 1798 | + | var r1 error | |||
| 1799 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*remote.SecretsListResult, error)); ok { | |||
| 1800 | + | return returnFunc(ctx, secretDomain) | |||
| 1801 | + | } | |||
| 1802 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *remote.SecretsListResult); ok { | |||
| 1803 | + | r0 = returnFunc(ctx, secretDomain) | |||
| 1804 | + | } else { | |||
| 1805 | + | if ret.Get(0) != nil { | |||
| 1806 | + | r0 = ret.Get(0).(*remote.SecretsListResult) | |||
| 1807 | + | } | |||
| 1808 | + | } | |||
| 1809 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 1810 | + | r1 = returnFunc(ctx, secretDomain) | |||
| 1811 | + | } else { | |||
| 1812 | + | r1 = ret.Error(1) | |||
| 1813 | + | } | |||
| 1814 | + | return r0, r1 | |||
| 1815 | + | } | |||
| 1816 | + | ||||
| 1817 | + | // MockControlPlane_ListSecretsWithAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSecretsWithAttachments' | |||
| 1818 | + | type MockControlPlane_ListSecretsWithAttachments_Call struct { | |||
| 1819 | + | *mock.Call | |||
| 1820 | + | } | |||
| 1821 | + | ||||
| 1822 | + | // ListSecretsWithAttachments is a helper method to define mock.On call | |||
| 1823 | + | // - ctx context.Context | |||
| 1824 | + | // - secretDomain string | |||
| 1825 | + | func (_e *MockControlPlane_Expecter) ListSecretsWithAttachments(ctx interface{}, secretDomain interface{}) *MockControlPlane_ListSecretsWithAttachments_Call { | |||
| 1826 | + | return &MockControlPlane_ListSecretsWithAttachments_Call{Call: _e.mock.On("ListSecretsWithAttachments", ctx, secretDomain)} | |||
| 1827 | + | } | |||
| 1828 | + | ||||
| 1829 | + | func (_c *MockControlPlane_ListSecretsWithAttachments_Call) Run(run func(ctx context.Context, secretDomain string)) *MockControlPlane_ListSecretsWithAttachments_Call { | |||
| 1830 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1831 | + | var arg0 context.Context | |||
| 1832 | + | if args[0] != nil { | |||
| 1833 | + | arg0 = args[0].(context.Context) | |||
| 1834 | + | } | |||
| 1835 | + | var arg1 string | |||
| 1836 | + | if args[1] != nil { | |||
| 1837 | + | arg1 = args[1].(string) | |||
| 1838 | + | } | |||
| 1839 | + | run( | |||
| 1840 | + | arg0, | |||
| 1841 | + | arg1, | |||
| 1842 | + | ) | |||
| 1843 | + | }) | |||
| 1844 | + | return _c | |||
| 1845 | + | } | |||
| 1846 | + | ||||
| 1847 | + | func (_c *MockControlPlane_ListSecretsWithAttachments_Call) Return(secretsListResult *remote.SecretsListResult, err error) *MockControlPlane_ListSecretsWithAttachments_Call { | |||
| 1848 | + | _c.Call.Return(secretsListResult, err) | |||
| 1849 | + | return _c | |||
| 1850 | + | } | |||
| 1851 | + | ||||
| 1852 | + | func (_c *MockControlPlane_ListSecretsWithAttachments_Call) RunAndReturn(run func(ctx context.Context, secretDomain string) (*remote.SecretsListResult, error)) *MockControlPlane_ListSecretsWithAttachments_Call { | |||
| 1853 | + | _c.Call.Return(run) | |||
| 1854 | + | return _c | |||
| 1855 | + | } | |||
| 1856 | + | ||||
| 1857 | + | // ListTags provides a mock function for the type MockControlPlane | |||
| 1858 | + | func (_mock *MockControlPlane) ListTags(ctx context.Context, repository string) ([]string, error) { | |||
| 1859 | + | ret := _mock.Called(ctx, repository) | |||
| 1860 | + | ||||
| 1861 | + | if len(ret) == 0 { | |||
| 1862 | + | panic("no return value specified for ListTags") | |||
| 1863 | + | } | |||
| 1864 | + | ||||
| 1865 | + | var r0 []string | |||
| 1866 | + | var r1 error | |||
| 1867 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { | |||
| 1868 | + | return returnFunc(ctx, repository) | |||
| 1869 | + | } | |||
| 1870 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok { | |||
| 1871 | + | r0 = returnFunc(ctx, repository) | |||
| 1872 | + | } else { | |||
| 1873 | + | if ret.Get(0) != nil { | |||
| 1874 | + | r0 = ret.Get(0).([]string) | |||
| 1875 | + | } | |||
| 1876 | + | } | |||
| 1877 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 1878 | + | r1 = returnFunc(ctx, repository) | |||
| 1879 | + | } else { | |||
| 1880 | + | r1 = ret.Error(1) | |||
| 1881 | + | } | |||
| 1882 | + | return r0, r1 | |||
| 1883 | + | } | |||
| 1884 | + | ||||
| 1885 | + | // MockControlPlane_ListTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListTags' | |||
| 1886 | + | type MockControlPlane_ListTags_Call struct { | |||
| 1887 | + | *mock.Call | |||
| 1888 | + | } | |||
| 1889 | + | ||||
| 1890 | + | // ListTags is a helper method to define mock.On call | |||
| 1891 | + | // - ctx context.Context | |||
| 1892 | + | // - repository string | |||
| 1893 | + | func (_e *MockControlPlane_Expecter) ListTags(ctx interface{}, repository interface{}) *MockControlPlane_ListTags_Call { | |||
| 1894 | + | return &MockControlPlane_ListTags_Call{Call: _e.mock.On("ListTags", ctx, repository)} | |||
| 1895 | + | } | |||
| 1896 | + | ||||
| 1897 | + | func (_c *MockControlPlane_ListTags_Call) Run(run func(ctx context.Context, repository string)) *MockControlPlane_ListTags_Call { | |||
| 1898 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1899 | + | var arg0 context.Context | |||
| 1900 | + | if args[0] != nil { | |||
| 1901 | + | arg0 = args[0].(context.Context) | |||
| 1902 | + | } | |||
| 1903 | + | var arg1 string | |||
| 1904 | + | if args[1] != nil { | |||
| 1905 | + | arg1 = args[1].(string) | |||
| 1906 | + | } | |||
| 1907 | + | run( | |||
| 1908 | + | arg0, | |||
| 1909 | + | arg1, | |||
| 1910 | + | ) | |||
| 1911 | + | }) | |||
| 1912 | + | return _c | |||
| 1913 | + | } | |||
| 1914 | + | ||||
| 1915 | + | func (_c *MockControlPlane_ListTags_Call) Return(strings []string, err error) *MockControlPlane_ListTags_Call { | |||
| 1916 | + | _c.Call.Return(strings, err) | |||
| 1917 | + | return _c | |||
| 1918 | + | } | |||
| 1919 | + | ||||
| 1920 | + | func (_c *MockControlPlane_ListTags_Call) RunAndReturn(run func(ctx context.Context, repository string) ([]string, error)) *MockControlPlane_ListTags_Call { | |||
| 1921 | + | _c.Call.Return(run) | |||
| 1922 | + | return _c | |||
| 1923 | + | } | |||
| 1924 | + | ||||
| 1925 | + | // ListVolumes provides a mock function for the type MockControlPlane | |||
| 1926 | + | func (_mock *MockControlPlane) ListVolumes(ctx context.Context) ([]dto.Volume, error) { | |||
| 1927 | + | ret := _mock.Called(ctx) | |||
| 1928 | + | ||||
| 1929 | + | if len(ret) == 0 { | |||
| 1930 | + | panic("no return value specified for ListVolumes") | |||
| 1931 | + | } | |||
| 1932 | + | ||||
| 1933 | + | var r0 []dto.Volume | |||
| 1934 | + | var r1 error | |||
| 1935 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]dto.Volume, error)); ok { | |||
| 1936 | + | return returnFunc(ctx) | |||
| 1937 | + | } | |||
| 1938 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []dto.Volume); ok { | |||
| 1939 | + | r0 = returnFunc(ctx) | |||
| 1940 | + | } else { | |||
| 1941 | + | if ret.Get(0) != nil { | |||
| 1942 | + | r0 = ret.Get(0).([]dto.Volume) | |||
| 1943 | + | } | |||
| 1944 | + | } | |||
| 1945 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1946 | + | r1 = returnFunc(ctx) | |||
| 1947 | + | } else { | |||
| 1948 | + | r1 = ret.Error(1) | |||
| 1949 | + | } | |||
| 1950 | + | return r0, r1 | |||
| 1951 | + | } | |||
| 1952 | + | ||||
| 1953 | + | // MockControlPlane_ListVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVolumes' | |||
| 1954 | + | type MockControlPlane_ListVolumes_Call struct { | |||
| 1955 | + | *mock.Call | |||
| 1956 | + | } | |||
| 1957 | + | ||||
| 1958 | + | // ListVolumes is a helper method to define mock.On call | |||
| 1959 | + | // - ctx context.Context | |||
| 1960 | + | func (_e *MockControlPlane_Expecter) ListVolumes(ctx interface{}) *MockControlPlane_ListVolumes_Call { | |||
| 1961 | + | return &MockControlPlane_ListVolumes_Call{Call: _e.mock.On("ListVolumes", ctx)} | |||
| 1962 | + | } | |||
| 1963 | + | ||||
| 1964 | + | func (_c *MockControlPlane_ListVolumes_Call) Run(run func(ctx context.Context)) *MockControlPlane_ListVolumes_Call { | |||
| 1965 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1966 | + | var arg0 context.Context | |||
| 1967 | + | if args[0] != nil { | |||
| 1968 | + | arg0 = args[0].(context.Context) | |||
| 1969 | + | } | |||
| 1970 | + | run( | |||
| 1971 | + | arg0, | |||
| 1972 | + | ) | |||
| 1973 | + | }) | |||
| 1974 | + | return _c | |||
| 1975 | + | } | |||
| 1976 | + | ||||
| 1977 | + | func (_c *MockControlPlane_ListVolumes_Call) Return(volumes []dto.Volume, err error) *MockControlPlane_ListVolumes_Call { | |||
| 1978 | + | _c.Call.Return(volumes, err) | |||
| 1979 | + | return _c | |||
| 1980 | + | } | |||
| 1981 | + | ||||
| 1982 | + | func (_c *MockControlPlane_ListVolumes_Call) RunAndReturn(run func(ctx context.Context) ([]dto.Volume, error)) *MockControlPlane_ListVolumes_Call { | |||
| 1983 | + | _c.Call.Return(run) | |||
| 1984 | + | return _c | |||
| 1985 | + | } | |||
| 1986 | + | ||||
| 1987 | + | // PruneVolumes provides a mock function for the type MockControlPlane | |||
| 1988 | + | func (_mock *MockControlPlane) PruneVolumes(ctx context.Context, req dto.VolumePruneRequest) (*dto.VolumePruneResponse, error) { | |||
| 1989 | + | ret := _mock.Called(ctx, req) | |||
| 1990 | + | ||||
| 1991 | + | if len(ret) == 0 { | |||
| 1992 | + | panic("no return value specified for PruneVolumes") | |||
| 1993 | + | } | |||
| 1994 | + | ||||
| 1995 | + | var r0 *dto.VolumePruneResponse | |||
| 1996 | + | var r1 error | |||
| 1997 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.VolumePruneRequest) (*dto.VolumePruneResponse, error)); ok { | |||
| 1998 | + | return returnFunc(ctx, req) | |||
| 1999 | + | } | |||
| 2000 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.VolumePruneRequest) *dto.VolumePruneResponse); ok { | |||
| 2001 | + | r0 = returnFunc(ctx, req) | |||
| 2002 | + | } else { | |||
| 2003 | + | if ret.Get(0) != nil { | |||
| 2004 | + | r0 = ret.Get(0).(*dto.VolumePruneResponse) | |||
| 2005 | + | } | |||
| 2006 | + | } | |||
| 2007 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, dto.VolumePruneRequest) error); ok { | |||
| 2008 | + | r1 = returnFunc(ctx, req) | |||
| 2009 | + | } else { | |||
| 2010 | + | r1 = ret.Error(1) | |||
| 2011 | + | } | |||
| 2012 | + | return r0, r1 | |||
| 2013 | + | } | |||
| 2014 | + | ||||
| 2015 | + | // MockControlPlane_PruneVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneVolumes' | |||
| 2016 | + | type MockControlPlane_PruneVolumes_Call struct { | |||
| 2017 | + | *mock.Call | |||
| 2018 | + | } | |||
| 2019 | + | ||||
| 2020 | + | // PruneVolumes is a helper method to define mock.On call | |||
| 2021 | + | // - ctx context.Context | |||
| 2022 | + | // - req dto.VolumePruneRequest | |||
| 2023 | + | func (_e *MockControlPlane_Expecter) PruneVolumes(ctx interface{}, req interface{}) *MockControlPlane_PruneVolumes_Call { | |||
| 2024 | + | return &MockControlPlane_PruneVolumes_Call{Call: _e.mock.On("PruneVolumes", ctx, req)} | |||
| 2025 | + | } | |||
| 2026 | + | ||||
| 2027 | + | func (_c *MockControlPlane_PruneVolumes_Call) Run(run func(ctx context.Context, req dto.VolumePruneRequest)) *MockControlPlane_PruneVolumes_Call { | |||
| 2028 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2029 | + | var arg0 context.Context | |||
| 2030 | + | if args[0] != nil { | |||
| 2031 | + | arg0 = args[0].(context.Context) | |||
| 2032 | + | } | |||
| 2033 | + | var arg1 dto.VolumePruneRequest | |||
| 2034 | + | if args[1] != nil { | |||
| 2035 | + | arg1 = args[1].(dto.VolumePruneRequest) | |||
| 2036 | + | } | |||
| 2037 | + | run( | |||
| 2038 | + | arg0, | |||
| 2039 | + | arg1, | |||
| 2040 | + | ) | |||
| 2041 | + | }) | |||
| 2042 | + | return _c | |||
| 2043 | + | } | |||
| 2044 | + | ||||
| 2045 | + | func (_c *MockControlPlane_PruneVolumes_Call) Return(volumePruneResponse *dto.VolumePruneResponse, err error) *MockControlPlane_PruneVolumes_Call { | |||
| 2046 | + | _c.Call.Return(volumePruneResponse, err) | |||
| 2047 | + | return _c | |||
| 2048 | + | } | |||
| 2049 | + | ||||
| 2050 | + | func (_c *MockControlPlane_PruneVolumes_Call) RunAndReturn(run func(ctx context.Context, req dto.VolumePruneRequest) (*dto.VolumePruneResponse, error)) *MockControlPlane_PruneVolumes_Call { | |||
| 2051 | + | _c.Call.Return(run) | |||
| 2052 | + | return _c | |||
| 2053 | + | } | |||
| 2054 | + | ||||
| 2055 | + | // Reload provides a mock function for the type MockControlPlane | |||
| 2056 | + | func (_mock *MockControlPlane) Reload(ctx context.Context) error { | |||
| 2057 | + | ret := _mock.Called(ctx) | |||
| 2058 | + | ||||
| 2059 | + | if len(ret) == 0 { | |||
| 2060 | + | panic("no return value specified for Reload") | |||
| 2061 | + | } | |||
| 2062 | + | ||||
| 2063 | + | var r0 error | |||
| 2064 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 2065 | + | r0 = returnFunc(ctx) | |||
| 2066 | + | } else { | |||
| 2067 | + | r0 = ret.Error(0) | |||
| 2068 | + | } | |||
| 2069 | + | return r0 | |||
| 2070 | + | } | |||
| 2071 | + | ||||
| 2072 | + | // MockControlPlane_Reload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reload' | |||
| 2073 | + | type MockControlPlane_Reload_Call struct { | |||
| 2074 | + | *mock.Call | |||
| 2075 | + | } | |||
| 2076 | + | ||||
| 2077 | + | // Reload is a helper method to define mock.On call | |||
| 2078 | + | // - ctx context.Context | |||
| 2079 | + | func (_e *MockControlPlane_Expecter) Reload(ctx interface{}) *MockControlPlane_Reload_Call { | |||
| 2080 | + | return &MockControlPlane_Reload_Call{Call: _e.mock.On("Reload", ctx)} | |||
| 2081 | + | } | |||
| 2082 | + | ||||
| 2083 | + | func (_c *MockControlPlane_Reload_Call) Run(run func(ctx context.Context)) *MockControlPlane_Reload_Call { | |||
| 2084 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2085 | + | var arg0 context.Context | |||
| 2086 | + | if args[0] != nil { | |||
| 2087 | + | arg0 = args[0].(context.Context) | |||
| 2088 | + | } | |||
| 2089 | + | run( | |||
| 2090 | + | arg0, | |||
| 2091 | + | ) | |||
| 2092 | + | }) | |||
| 2093 | + | return _c | |||
| 2094 | + | } | |||
| 2095 | + | ||||
| 2096 | + | func (_c *MockControlPlane_Reload_Call) Return(err error) *MockControlPlane_Reload_Call { | |||
| 2097 | + | _c.Call.Return(err) | |||
| 2098 | + | return _c | |||
| 2099 | + | } | |||
| 2100 | + | ||||
| 2101 | + | func (_c *MockControlPlane_Reload_Call) RunAndReturn(run func(ctx context.Context) error) *MockControlPlane_Reload_Call { | |||
| 2102 | + | _c.Call.Return(run) | |||
| 2103 | + | return _c | |||
| 2104 | + | } | |||
| 2105 | + | ||||
| 2106 | + | // RemoveAttachment provides a mock function for the type MockControlPlane | |||
| 2107 | + | func (_mock *MockControlPlane) RemoveAttachment(ctx context.Context, domainOrGroup string, image string) error { | |||
| 2108 | + | ret := _mock.Called(ctx, domainOrGroup, image) | |||
| 2109 | + | ||||
| 2110 | + | if len(ret) == 0 { | |||
| 2111 | + | panic("no return value specified for RemoveAttachment") | |||
| 2112 | + | } | |||
| 2113 | + | ||||
| 2114 | + | var r0 error | |||
| 2115 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { | |||
| 2116 | + | r0 = returnFunc(ctx, domainOrGroup, image) | |||
| 2117 | + | } else { | |||
| 2118 | + | r0 = ret.Error(0) | |||
| 2119 | + | } | |||
| 2120 | + | return r0 | |||
| 2121 | + | } | |||
| 2122 | + | ||||
| 2123 | + | // MockControlPlane_RemoveAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAttachment' | |||
| 2124 | + | type MockControlPlane_RemoveAttachment_Call struct { | |||
| 2125 | + | *mock.Call | |||
| 2126 | + | } | |||
| 2127 | + | ||||
| 2128 | + | // RemoveAttachment is a helper method to define mock.On call | |||
| 2129 | + | // - ctx context.Context | |||
| 2130 | + | // - domainOrGroup string | |||
| 2131 | + | // - image string | |||
| 2132 | + | func (_e *MockControlPlane_Expecter) RemoveAttachment(ctx interface{}, domainOrGroup interface{}, image interface{}) *MockControlPlane_RemoveAttachment_Call { | |||
| 2133 | + | return &MockControlPlane_RemoveAttachment_Call{Call: _e.mock.On("RemoveAttachment", ctx, domainOrGroup, image)} | |||
| 2134 | + | } | |||
| 2135 | + | ||||
| 2136 | + | func (_c *MockControlPlane_RemoveAttachment_Call) Run(run func(ctx context.Context, domainOrGroup string, image string)) *MockControlPlane_RemoveAttachment_Call { | |||
| 2137 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2138 | + | var arg0 context.Context | |||
| 2139 | + | if args[0] != nil { | |||
| 2140 | + | arg0 = args[0].(context.Context) | |||
| 2141 | + | } | |||
| 2142 | + | var arg1 string | |||
| 2143 | + | if args[1] != nil { | |||
| 2144 | + | arg1 = args[1].(string) | |||
| 2145 | + | } | |||
| 2146 | + | var arg2 string | |||
| 2147 | + | if args[2] != nil { | |||
| 2148 | + | arg2 = args[2].(string) | |||
| 2149 | + | } | |||
| 2150 | + | run( | |||
| 2151 | + | arg0, | |||
| 2152 | + | arg1, | |||
| 2153 | + | arg2, | |||
| 2154 | + | ) | |||
| 2155 | + | }) | |||
| 2156 | + | return _c | |||
| 2157 | + | } | |||
| 2158 | + | ||||
| 2159 | + | func (_c *MockControlPlane_RemoveAttachment_Call) Return(err error) *MockControlPlane_RemoveAttachment_Call { | |||
| 2160 | + | _c.Call.Return(err) | |||
| 2161 | + | return _c | |||
| 2162 | + | } | |||
| 2163 | + | ||||
| 2164 | + | func (_c *MockControlPlane_RemoveAttachment_Call) RunAndReturn(run func(ctx context.Context, domainOrGroup string, image string) error) *MockControlPlane_RemoveAttachment_Call { | |||
| 2165 | + | _c.Call.Return(run) | |||
| 2166 | + | return _c | |||
| 2167 | + | } | |||
| 2168 | + | ||||
| 2169 | + | // RemoveAutoRouteAllowedDomain provides a mock function for the type MockControlPlane | |||
| 2170 | + | func (_mock *MockControlPlane) RemoveAutoRouteAllowedDomain(ctx context.Context, pattern string) error { | |||
| 2171 | + | ret := _mock.Called(ctx, pattern) | |||
| 2172 | + | ||||
| 2173 | + | if len(ret) == 0 { | |||
| 2174 | + | panic("no return value specified for RemoveAutoRouteAllowedDomain") | |||
| 2175 | + | } | |||
| 2176 | + | ||||
| 2177 | + | var r0 error | |||
| 2178 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 2179 | + | r0 = returnFunc(ctx, pattern) | |||
| 2180 | + | } else { | |||
| 2181 | + | r0 = ret.Error(0) | |||
| 2182 | + | } | |||
| 2183 | + | return r0 | |||
| 2184 | + | } | |||
| 2185 | + | ||||
| 2186 | + | // MockControlPlane_RemoveAutoRouteAllowedDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAutoRouteAllowedDomain' | |||
| 2187 | + | type MockControlPlane_RemoveAutoRouteAllowedDomain_Call struct { | |||
| 2188 | + | *mock.Call | |||
| 2189 | + | } | |||
| 2190 | + | ||||
| 2191 | + | // RemoveAutoRouteAllowedDomain is a helper method to define mock.On call | |||
| 2192 | + | // - ctx context.Context | |||
| 2193 | + | // - pattern string | |||
| 2194 | + | func (_e *MockControlPlane_Expecter) RemoveAutoRouteAllowedDomain(ctx interface{}, pattern interface{}) *MockControlPlane_RemoveAutoRouteAllowedDomain_Call { | |||
| 2195 | + | return &MockControlPlane_RemoveAutoRouteAllowedDomain_Call{Call: _e.mock.On("RemoveAutoRouteAllowedDomain", ctx, pattern)} | |||
| 2196 | + | } | |||
| 2197 | + | ||||
| 2198 | + | func (_c *MockControlPlane_RemoveAutoRouteAllowedDomain_Call) Run(run func(ctx context.Context, pattern string)) *MockControlPlane_RemoveAutoRouteAllowedDomain_Call { | |||
| 2199 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2200 | + | var arg0 context.Context | |||
| 2201 | + | if args[0] != nil { | |||
| 2202 | + | arg0 = args[0].(context.Context) | |||
| 2203 | + | } | |||
| 2204 | + | var arg1 string | |||
| 2205 | + | if args[1] != nil { | |||
| 2206 | + | arg1 = args[1].(string) | |||
| 2207 | + | } | |||
| 2208 | + | run( | |||
| 2209 | + | arg0, | |||
| 2210 | + | arg1, | |||
| 2211 | + | ) | |||
| 2212 | + | }) | |||
| 2213 | + | return _c | |||
| 2214 | + | } | |||
| 2215 | + | ||||
| 2216 | + | func (_c *MockControlPlane_RemoveAutoRouteAllowedDomain_Call) Return(err error) *MockControlPlane_RemoveAutoRouteAllowedDomain_Call { | |||
| 2217 | + | _c.Call.Return(err) | |||
| 2218 | + | return _c | |||
| 2219 | + | } | |||
| 2220 | + | ||||
| 2221 | + | func (_c *MockControlPlane_RemoveAutoRouteAllowedDomain_Call) RunAndReturn(run func(ctx context.Context, pattern string) error) *MockControlPlane_RemoveAutoRouteAllowedDomain_Call { | |||
| 2222 | + | _c.Call.Return(run) | |||
| 2223 | + | return _c | |||
| 2224 | + | } | |||
| 2225 | + | ||||
| 2226 | + | // RemoveRoute provides a mock function for the type MockControlPlane | |||
| 2227 | + | func (_mock *MockControlPlane) RemoveRoute(ctx context.Context, routeDomain string) error { | |||
| 2228 | + | ret := _mock.Called(ctx, routeDomain) | |||
| 2229 | + | ||||
| 2230 | + | if len(ret) == 0 { | |||
| 2231 | + | panic("no return value specified for RemoveRoute") | |||
| 2232 | + | } | |||
| 2233 | + | ||||
| 2234 | + | var r0 error | |||
| 2235 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 2236 | + | r0 = returnFunc(ctx, routeDomain) | |||
| 2237 | + | } else { | |||
| 2238 | + | r0 = ret.Error(0) | |||
| 2239 | + | } | |||
| 2240 | + | return r0 | |||
| 2241 | + | } | |||
| 2242 | + | ||||
| 2243 | + | // MockControlPlane_RemoveRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRoute' | |||
| 2244 | + | type MockControlPlane_RemoveRoute_Call struct { | |||
| 2245 | + | *mock.Call | |||
| 2246 | + | } | |||
| 2247 | + | ||||
| 2248 | + | // RemoveRoute is a helper method to define mock.On call | |||
| 2249 | + | // - ctx context.Context | |||
| 2250 | + | // - routeDomain string | |||
| 2251 | + | func (_e *MockControlPlane_Expecter) RemoveRoute(ctx interface{}, routeDomain interface{}) *MockControlPlane_RemoveRoute_Call { | |||
| 2252 | + | return &MockControlPlane_RemoveRoute_Call{Call: _e.mock.On("RemoveRoute", ctx, routeDomain)} | |||
| 2253 | + | } | |||
| 2254 | + | ||||
| 2255 | + | func (_c *MockControlPlane_RemoveRoute_Call) Run(run func(ctx context.Context, routeDomain string)) *MockControlPlane_RemoveRoute_Call { | |||
| 2256 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2257 | + | var arg0 context.Context | |||
| 2258 | + | if args[0] != nil { | |||
| 2259 | + | arg0 = args[0].(context.Context) | |||
| 2260 | + | } | |||
| 2261 | + | var arg1 string | |||
| 2262 | + | if args[1] != nil { | |||
| 2263 | + | arg1 = args[1].(string) | |||
| 2264 | + | } | |||
| 2265 | + | run( | |||
| 2266 | + | arg0, | |||
| 2267 | + | arg1, | |||
| 2268 | + | ) | |||
| 2269 | + | }) | |||
| 2270 | + | return _c | |||
| 2271 | + | } | |||
| 2272 | + | ||||
| 2273 | + | func (_c *MockControlPlane_RemoveRoute_Call) Return(err error) *MockControlPlane_RemoveRoute_Call { | |||
| 2274 | + | _c.Call.Return(err) | |||
| 2275 | + | return _c | |||
| 2276 | + | } | |||
| 2277 | + | ||||
| 2278 | + | func (_c *MockControlPlane_RemoveRoute_Call) RunAndReturn(run func(ctx context.Context, routeDomain string) error) *MockControlPlane_RemoveRoute_Call { | |||
| 2279 | + | _c.Call.Return(run) | |||
| 2280 | + | return _c | |||
| 2281 | + | } | |||
| 2282 | + | ||||
| 2283 | + | // Restart provides a mock function for the type MockControlPlane | |||
| 2284 | + | func (_mock *MockControlPlane) Restart(ctx context.Context, restartDomain string, withAttachments bool) (*remote.RestartResult, error) { | |||
| 2285 | + | ret := _mock.Called(ctx, restartDomain, withAttachments) | |||
| 2286 | + | ||||
| 2287 | + | if len(ret) == 0 { | |||
| 2288 | + | panic("no return value specified for Restart") | |||
| 2289 | + | } | |||
| 2290 | + | ||||
| 2291 | + | var r0 *remote.RestartResult | |||
| 2292 | + | var r1 error | |||
| 2293 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) (*remote.RestartResult, error)); ok { | |||
| 2294 | + | return returnFunc(ctx, restartDomain, withAttachments) | |||
| 2295 | + | } | |||
| 2296 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) *remote.RestartResult); ok { | |||
| 2297 | + | r0 = returnFunc(ctx, restartDomain, withAttachments) | |||
| 2298 | + | } else { | |||
| 2299 | + | if ret.Get(0) != nil { | |||
| 2300 | + | r0 = ret.Get(0).(*remote.RestartResult) | |||
| 2301 | + | } | |||
| 2302 | + | } | |||
| 2303 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { | |||
| 2304 | + | r1 = returnFunc(ctx, restartDomain, withAttachments) | |||
| 2305 | + | } else { | |||
| 2306 | + | r1 = ret.Error(1) | |||
| 2307 | + | } | |||
| 2308 | + | return r0, r1 | |||
| 2309 | + | } | |||
| 2310 | + | ||||
| 2311 | + | // MockControlPlane_Restart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restart' | |||
| 2312 | + | type MockControlPlane_Restart_Call struct { | |||
| 2313 | + | *mock.Call | |||
| 2314 | + | } | |||
| 2315 | + | ||||
| 2316 | + | // Restart is a helper method to define mock.On call | |||
| 2317 | + | // - ctx context.Context | |||
| 2318 | + | // - restartDomain string | |||
| 2319 | + | // - withAttachments bool | |||
| 2320 | + | func (_e *MockControlPlane_Expecter) Restart(ctx interface{}, restartDomain interface{}, withAttachments interface{}) *MockControlPlane_Restart_Call { | |||
| 2321 | + | return &MockControlPlane_Restart_Call{Call: _e.mock.On("Restart", ctx, restartDomain, withAttachments)} | |||
| 2322 | + | } | |||
| 2323 | + | ||||
| 2324 | + | func (_c *MockControlPlane_Restart_Call) Run(run func(ctx context.Context, restartDomain string, withAttachments bool)) *MockControlPlane_Restart_Call { | |||
| 2325 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2326 | + | var arg0 context.Context | |||
| 2327 | + | if args[0] != nil { | |||
| 2328 | + | arg0 = args[0].(context.Context) | |||
| 2329 | + | } | |||
| 2330 | + | var arg1 string | |||
| 2331 | + | if args[1] != nil { | |||
| 2332 | + | arg1 = args[1].(string) | |||
| 2333 | + | } | |||
| 2334 | + | var arg2 bool | |||
| 2335 | + | if args[2] != nil { | |||
| 2336 | + | arg2 = args[2].(bool) | |||
| 2337 | + | } | |||
| 2338 | + | run( | |||
| 2339 | + | arg0, | |||
| 2340 | + | arg1, | |||
| 2341 | + | arg2, | |||
| 2342 | + | ) | |||
| 2343 | + | }) | |||
| 2344 | + | return _c | |||
| 2345 | + | } | |||
| 2346 | + | ||||
| 2347 | + | func (_c *MockControlPlane_Restart_Call) Return(restartResult *remote.RestartResult, err error) *MockControlPlane_Restart_Call { | |||
| 2348 | + | _c.Call.Return(restartResult, err) | |||
| 2349 | + | return _c | |||
| 2350 | + | } | |||
| 2351 | + | ||||
| 2352 | + | func (_c *MockControlPlane_Restart_Call) RunAndReturn(run func(ctx context.Context, restartDomain string, withAttachments bool) (*remote.RestartResult, error)) *MockControlPlane_Restart_Call { | |||
| 2353 | + | _c.Call.Return(run) | |||
| 2354 | + | return _c | |||
| 2355 | + | } | |||
| 2356 | + | ||||
| 2357 | + | // RunBackup provides a mock function for the type MockControlPlane | |||
| 2358 | + | func (_mock *MockControlPlane) RunBackup(ctx context.Context, backupDomain string, dbName string) (*dto.BackupRunResponse, error) { | |||
| 2359 | + | ret := _mock.Called(ctx, backupDomain, dbName) | |||
| 2360 | + | ||||
| 2361 | + | if len(ret) == 0 { | |||
| 2362 | + | panic("no return value specified for RunBackup") | |||
| 2363 | + | } | |||
| 2364 | + | ||||
| 2365 | + | var r0 *dto.BackupRunResponse | |||
| 2366 | + | var r1 error | |||
| 2367 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*dto.BackupRunResponse, error)); ok { | |||
| 2368 | + | return returnFunc(ctx, backupDomain, dbName) | |||
| 2369 | + | } | |||
| 2370 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *dto.BackupRunResponse); ok { | |||
| 2371 | + | r0 = returnFunc(ctx, backupDomain, dbName) | |||
| 2372 | + | } else { | |||
| 2373 | + | if ret.Get(0) != nil { | |||
| 2374 | + | r0 = ret.Get(0).(*dto.BackupRunResponse) | |||
| 2375 | + | } | |||
| 2376 | + | } | |||
| 2377 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { | |||
| 2378 | + | r1 = returnFunc(ctx, backupDomain, dbName) | |||
| 2379 | + | } else { | |||
| 2380 | + | r1 = ret.Error(1) | |||
| 2381 | + | } | |||
| 2382 | + | return r0, r1 | |||
| 2383 | + | } | |||
| 2384 | + | ||||
| 2385 | + | // MockControlPlane_RunBackup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunBackup' | |||
| 2386 | + | type MockControlPlane_RunBackup_Call struct { | |||
| 2387 | + | *mock.Call | |||
| 2388 | + | } | |||
| 2389 | + | ||||
| 2390 | + | // RunBackup is a helper method to define mock.On call | |||
| 2391 | + | // - ctx context.Context | |||
| 2392 | + | // - backupDomain string | |||
| 2393 | + | // - dbName string | |||
| 2394 | + | func (_e *MockControlPlane_Expecter) RunBackup(ctx interface{}, backupDomain interface{}, dbName interface{}) *MockControlPlane_RunBackup_Call { | |||
| 2395 | + | return &MockControlPlane_RunBackup_Call{Call: _e.mock.On("RunBackup", ctx, backupDomain, dbName)} | |||
| 2396 | + | } | |||
| 2397 | + | ||||
| 2398 | + | func (_c *MockControlPlane_RunBackup_Call) Run(run func(ctx context.Context, backupDomain string, dbName string)) *MockControlPlane_RunBackup_Call { | |||
| 2399 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2400 | + | var arg0 context.Context | |||
| 2401 | + | if args[0] != nil { | |||
| 2402 | + | arg0 = args[0].(context.Context) | |||
| 2403 | + | } | |||
| 2404 | + | var arg1 string | |||
| 2405 | + | if args[1] != nil { | |||
| 2406 | + | arg1 = args[1].(string) | |||
| 2407 | + | } | |||
| 2408 | + | var arg2 string | |||
| 2409 | + | if args[2] != nil { | |||
| 2410 | + | arg2 = args[2].(string) | |||
| 2411 | + | } | |||
| 2412 | + | run( | |||
| 2413 | + | arg0, | |||
| 2414 | + | arg1, | |||
| 2415 | + | arg2, | |||
| 2416 | + | ) | |||
| 2417 | + | }) | |||
| 2418 | + | return _c | |||
| 2419 | + | } | |||
| 2420 | + | ||||
| 2421 | + | func (_c *MockControlPlane_RunBackup_Call) Return(backupRunResponse *dto.BackupRunResponse, err error) *MockControlPlane_RunBackup_Call { | |||
| 2422 | + | _c.Call.Return(backupRunResponse, err) | |||
| 2423 | + | return _c | |||
| 2424 | + | } | |||
| 2425 | + | ||||
| 2426 | + | func (_c *MockControlPlane_RunBackup_Call) RunAndReturn(run func(ctx context.Context, backupDomain string, dbName string) (*dto.BackupRunResponse, error)) *MockControlPlane_RunBackup_Call { | |||
| 2427 | + | _c.Call.Return(run) | |||
| 2428 | + | return _c | |||
| 2429 | + | } | |||
| 2430 | + | ||||
| 2431 | + | // SetAttachmentSecrets provides a mock function for the type MockControlPlane | |||
| 2432 | + | func (_mock *MockControlPlane) SetAttachmentSecrets(ctx context.Context, domain1 string, service string, secrets map[string]string) error { | |||
| 2433 | + | ret := _mock.Called(ctx, domain1, service, secrets) | |||
| 2434 | + | ||||
| 2435 | + | if len(ret) == 0 { | |||
| 2436 | + | panic("no return value specified for SetAttachmentSecrets") | |||
| 2437 | + | } | |||
| 2438 | + | ||||
| 2439 | + | var r0 error | |||
| 2440 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, map[string]string) error); ok { | |||
| 2441 | + | r0 = returnFunc(ctx, domain1, service, secrets) | |||
| 2442 | + | } else { | |||
| 2443 | + | r0 = ret.Error(0) | |||
| 2444 | + | } | |||
| 2445 | + | return r0 | |||
| 2446 | + | } | |||
| 2447 | + | ||||
| 2448 | + | // MockControlPlane_SetAttachmentSecrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAttachmentSecrets' | |||
| 2449 | + | type MockControlPlane_SetAttachmentSecrets_Call struct { | |||
| 2450 | + | *mock.Call | |||
| 2451 | + | } | |||
| 2452 | + | ||||
| 2453 | + | // SetAttachmentSecrets is a helper method to define mock.On call | |||
| 2454 | + | // - ctx context.Context | |||
| 2455 | + | // - domain1 string | |||
| 2456 | + | // - service string | |||
| 2457 | + | // - secrets map[string]string | |||
| 2458 | + | func (_e *MockControlPlane_Expecter) SetAttachmentSecrets(ctx interface{}, domain1 interface{}, service interface{}, secrets interface{}) *MockControlPlane_SetAttachmentSecrets_Call { | |||
| 2459 | + | return &MockControlPlane_SetAttachmentSecrets_Call{Call: _e.mock.On("SetAttachmentSecrets", ctx, domain1, service, secrets)} | |||
| 2460 | + | } | |||
| 2461 | + | ||||
| 2462 | + | func (_c *MockControlPlane_SetAttachmentSecrets_Call) Run(run func(ctx context.Context, domain1 string, service string, secrets map[string]string)) *MockControlPlane_SetAttachmentSecrets_Call { | |||
| 2463 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2464 | + | var arg0 context.Context | |||
| 2465 | + | if args[0] != nil { | |||
| 2466 | + | arg0 = args[0].(context.Context) | |||
| 2467 | + | } | |||
| 2468 | + | var arg1 string | |||
| 2469 | + | if args[1] != nil { | |||
| 2470 | + | arg1 = args[1].(string) | |||
| 2471 | + | } | |||
| 2472 | + | var arg2 string | |||
| 2473 | + | if args[2] != nil { | |||
| 2474 | + | arg2 = args[2].(string) | |||
| 2475 | + | } | |||
| 2476 | + | var arg3 map[string]string | |||
| 2477 | + | if args[3] != nil { | |||
| 2478 | + | arg3 = args[3].(map[string]string) | |||
| 2479 | + | } | |||
| 2480 | + | run( | |||
| 2481 | + | arg0, | |||
| 2482 | + | arg1, | |||
| 2483 | + | arg2, | |||
| 2484 | + | arg3, | |||
| 2485 | + | ) | |||
| 2486 | + | }) | |||
| 2487 | + | return _c | |||
| 2488 | + | } | |||
| 2489 | + | ||||
| 2490 | + | func (_c *MockControlPlane_SetAttachmentSecrets_Call) Return(err error) *MockControlPlane_SetAttachmentSecrets_Call { | |||
| 2491 | + | _c.Call.Return(err) | |||
| 2492 | + | return _c | |||
| 2493 | + | } | |||
| 2494 | + | ||||
| 2495 | + | func (_c *MockControlPlane_SetAttachmentSecrets_Call) RunAndReturn(run func(ctx context.Context, domain1 string, service string, secrets map[string]string) error) *MockControlPlane_SetAttachmentSecrets_Call { | |||
| 2496 | + | _c.Call.Return(run) | |||
| 2497 | + | return _c | |||
| 2498 | + | } | |||
| 2499 | + | ||||
| 2500 | + | // SetSecrets provides a mock function for the type MockControlPlane | |||
| 2501 | + | func (_mock *MockControlPlane) SetSecrets(ctx context.Context, secretDomain string, secrets map[string]string) error { | |||
| 2502 | + | ret := _mock.Called(ctx, secretDomain, secrets) | |||
| 2503 | + | ||||
| 2504 | + | if len(ret) == 0 { | |||
| 2505 | + | panic("no return value specified for SetSecrets") | |||
| 2506 | + | } | |||
| 2507 | + | ||||
| 2508 | + | var r0 error | |||
| 2509 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, map[string]string) error); ok { | |||
| 2510 | + | r0 = returnFunc(ctx, secretDomain, secrets) | |||
| 2511 | + | } else { | |||
| 2512 | + | r0 = ret.Error(0) | |||
| 2513 | + | } | |||
| 2514 | + | return r0 | |||
| 2515 | + | } | |||
| 2516 | + | ||||
| 2517 | + | // MockControlPlane_SetSecrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSecrets' | |||
| 2518 | + | type MockControlPlane_SetSecrets_Call struct { | |||
| 2519 | + | *mock.Call | |||
| 2520 | + | } | |||
| 2521 | + | ||||
| 2522 | + | // SetSecrets is a helper method to define mock.On call | |||
| 2523 | + | // - ctx context.Context | |||
| 2524 | + | // - secretDomain string | |||
| 2525 | + | // - secrets map[string]string | |||
| 2526 | + | func (_e *MockControlPlane_Expecter) SetSecrets(ctx interface{}, secretDomain interface{}, secrets interface{}) *MockControlPlane_SetSecrets_Call { | |||
| 2527 | + | return &MockControlPlane_SetSecrets_Call{Call: _e.mock.On("SetSecrets", ctx, secretDomain, secrets)} | |||
| 2528 | + | } | |||
| 2529 | + | ||||
| 2530 | + | func (_c *MockControlPlane_SetSecrets_Call) Run(run func(ctx context.Context, secretDomain string, secrets map[string]string)) *MockControlPlane_SetSecrets_Call { | |||
| 2531 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2532 | + | var arg0 context.Context | |||
| 2533 | + | if args[0] != nil { | |||
| 2534 | + | arg0 = args[0].(context.Context) | |||
| 2535 | + | } | |||
| 2536 | + | var arg1 string | |||
| 2537 | + | if args[1] != nil { | |||
| 2538 | + | arg1 = args[1].(string) | |||
| 2539 | + | } | |||
| 2540 | + | var arg2 map[string]string | |||
| 2541 | + | if args[2] != nil { | |||
| 2542 | + | arg2 = args[2].(map[string]string) | |||
| 2543 | + | } | |||
| 2544 | + | run( | |||
| 2545 | + | arg0, | |||
| 2546 | + | arg1, | |||
| 2547 | + | arg2, | |||
| 2548 | + | ) | |||
| 2549 | + | }) | |||
| 2550 | + | return _c | |||
| 2551 | + | } | |||
| 2552 | + | ||||
| 2553 | + | func (_c *MockControlPlane_SetSecrets_Call) Return(err error) *MockControlPlane_SetSecrets_Call { | |||
| 2554 | + | _c.Call.Return(err) | |||
| 2555 | + | return _c | |||
| 2556 | + | } | |||
| 2557 | + | ||||
| 2558 | + | func (_c *MockControlPlane_SetSecrets_Call) RunAndReturn(run func(ctx context.Context, secretDomain string, secrets map[string]string) error) *MockControlPlane_SetSecrets_Call { | |||
| 2559 | + | _c.Call.Return(run) | |||
| 2560 | + | return _c | |||
| 2561 | + | } | |||
| 2562 | + | ||||
| 2563 | + | // StreamContainerLogs provides a mock function for the type MockControlPlane | |||
| 2564 | + | func (_mock *MockControlPlane) StreamContainerLogs(ctx context.Context, logDomain string, lines int) (<-chan string, error) { | |||
| 2565 | + | ret := _mock.Called(ctx, logDomain, lines) | |||
| 2566 | + | ||||
| 2567 | + | if len(ret) == 0 { | |||
| 2568 | + | panic("no return value specified for StreamContainerLogs") | |||
| 2569 | + | } | |||
| 2570 | + | ||||
| 2571 | + | var r0 <-chan string | |||
| 2572 | + | var r1 error | |||
| 2573 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) (<-chan string, error)); ok { | |||
| 2574 | + | return returnFunc(ctx, logDomain, lines) | |||
| 2575 | + | } | |||
| 2576 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) <-chan string); ok { | |||
| 2577 | + | r0 = returnFunc(ctx, logDomain, lines) | |||
| 2578 | + | } else { | |||
| 2579 | + | if ret.Get(0) != nil { | |||
| 2580 | + | r0 = ret.Get(0).(<-chan string) | |||
| 2581 | + | } | |||
| 2582 | + | } | |||
| 2583 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, int) error); ok { | |||
| 2584 | + | r1 = returnFunc(ctx, logDomain, lines) | |||
| 2585 | + | } else { | |||
| 2586 | + | r1 = ret.Error(1) | |||
| 2587 | + | } | |||
| 2588 | + | return r0, r1 | |||
| 2589 | + | } | |||
| 2590 | + | ||||
| 2591 | + | // MockControlPlane_StreamContainerLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StreamContainerLogs' | |||
| 2592 | + | type MockControlPlane_StreamContainerLogs_Call struct { | |||
| 2593 | + | *mock.Call | |||
| 2594 | + | } | |||
| 2595 | + | ||||
| 2596 | + | // StreamContainerLogs is a helper method to define mock.On call | |||
| 2597 | + | // - ctx context.Context | |||
| 2598 | + | // - logDomain string | |||
| 2599 | + | // - lines int | |||
| 2600 | + | func (_e *MockControlPlane_Expecter) StreamContainerLogs(ctx interface{}, logDomain interface{}, lines interface{}) *MockControlPlane_StreamContainerLogs_Call { | |||
| 2601 | + | return &MockControlPlane_StreamContainerLogs_Call{Call: _e.mock.On("StreamContainerLogs", ctx, logDomain, lines)} | |||
| 2602 | + | } | |||
| 2603 | + | ||||
| 2604 | + | func (_c *MockControlPlane_StreamContainerLogs_Call) Run(run func(ctx context.Context, logDomain string, lines int)) *MockControlPlane_StreamContainerLogs_Call { | |||
| 2605 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2606 | + | var arg0 context.Context | |||
| 2607 | + | if args[0] != nil { | |||
| 2608 | + | arg0 = args[0].(context.Context) | |||
| 2609 | + | } | |||
| 2610 | + | var arg1 string | |||
| 2611 | + | if args[1] != nil { | |||
| 2612 | + | arg1 = args[1].(string) | |||
| 2613 | + | } | |||
| 2614 | + | var arg2 int | |||
| 2615 | + | if args[2] != nil { | |||
| 2616 | + | arg2 = args[2].(int) | |||
| 2617 | + | } | |||
| 2618 | + | run( | |||
| 2619 | + | arg0, | |||
| 2620 | + | arg1, | |||
| 2621 | + | arg2, | |||
| 2622 | + | ) | |||
| 2623 | + | }) | |||
| 2624 | + | return _c | |||
| 2625 | + | } | |||
| 2626 | + | ||||
| 2627 | + | func (_c *MockControlPlane_StreamContainerLogs_Call) Return(stringCh <-chan string, err error) *MockControlPlane_StreamContainerLogs_Call { | |||
| 2628 | + | _c.Call.Return(stringCh, err) | |||
| 2629 | + | return _c | |||
| 2630 | + | } | |||
| 2631 | + | ||||
| 2632 | + | func (_c *MockControlPlane_StreamContainerLogs_Call) RunAndReturn(run func(ctx context.Context, logDomain string, lines int) (<-chan string, error)) *MockControlPlane_StreamContainerLogs_Call { | |||
| 2633 | + | _c.Call.Return(run) | |||
| 2634 | + | return _c | |||
| 2635 | + | } | |||
| 2636 | + | ||||
| 2637 | + | // StreamProcessLogs provides a mock function for the type MockControlPlane | |||
| 2638 | + | func (_mock *MockControlPlane) StreamProcessLogs(ctx context.Context, lines int) (<-chan string, error) { | |||
| 2639 | + | ret := _mock.Called(ctx, lines) | |||
| 2640 | + | ||||
| 2641 | + | if len(ret) == 0 { | |||
| 2642 | + | panic("no return value specified for StreamProcessLogs") | |||
| 2643 | + | } | |||
| 2644 | + | ||||
| 2645 | + | var r0 <-chan string | |||
| 2646 | + | var r1 error | |||
| 2647 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) (<-chan string, error)); ok { | |||
| 2648 | + | return returnFunc(ctx, lines) | |||
| 2649 | + | } | |||
| 2650 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) <-chan string); ok { | |||
| 2651 | + | r0 = returnFunc(ctx, lines) | |||
| 2652 | + | } else { | |||
| 2653 | + | if ret.Get(0) != nil { | |||
| 2654 | + | r0 = ret.Get(0).(<-chan string) | |||
| 2655 | + | } | |||
| 2656 | + | } | |||
| 2657 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |||
| 2658 | + | r1 = returnFunc(ctx, lines) | |||
| 2659 | + | } else { | |||
| 2660 | + | r1 = ret.Error(1) | |||
| 2661 | + | } | |||
| 2662 | + | return r0, r1 | |||
| 2663 | + | } | |||
| 2664 | + | ||||
| 2665 | + | // MockControlPlane_StreamProcessLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StreamProcessLogs' | |||
| 2666 | + | type MockControlPlane_StreamProcessLogs_Call struct { | |||
| 2667 | + | *mock.Call | |||
| 2668 | + | } | |||
| 2669 | + | ||||
| 2670 | + | // StreamProcessLogs is a helper method to define mock.On call | |||
| 2671 | + | // - ctx context.Context | |||
| 2672 | + | // - lines int | |||
| 2673 | + | func (_e *MockControlPlane_Expecter) StreamProcessLogs(ctx interface{}, lines interface{}) *MockControlPlane_StreamProcessLogs_Call { | |||
| 2674 | + | return &MockControlPlane_StreamProcessLogs_Call{Call: _e.mock.On("StreamProcessLogs", ctx, lines)} | |||
| 2675 | + | } | |||
| 2676 | + | ||||
| 2677 | + | func (_c *MockControlPlane_StreamProcessLogs_Call) Run(run func(ctx context.Context, lines int)) *MockControlPlane_StreamProcessLogs_Call { | |||
| 2678 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2679 | + | var arg0 context.Context | |||
| 2680 | + | if args[0] != nil { | |||
| 2681 | + | arg0 = args[0].(context.Context) | |||
| 2682 | + | } | |||
| 2683 | + | var arg1 int | |||
| 2684 | + | if args[1] != nil { | |||
| 2685 | + | arg1 = args[1].(int) | |||
| 2686 | + | } | |||
| 2687 | + | run( | |||
| 2688 | + | arg0, | |||
| 2689 | + | arg1, | |||
| 2690 | + | ) | |||
| 2691 | + | }) | |||
| 2692 | + | return _c | |||
| 2693 | + | } | |||
| 2694 | + | ||||
| 2695 | + | func (_c *MockControlPlane_StreamProcessLogs_Call) Return(stringCh <-chan string, err error) *MockControlPlane_StreamProcessLogs_Call { | |||
| 2696 | + | _c.Call.Return(stringCh, err) | |||
| 2697 | + | return _c | |||
| 2698 | + | } | |||
| 2699 | + | ||||
| 2700 | + | func (_c *MockControlPlane_StreamProcessLogs_Call) RunAndReturn(run func(ctx context.Context, lines int) (<-chan string, error)) *MockControlPlane_StreamProcessLogs_Call { | |||
| 2701 | + | _c.Call.Return(run) | |||
| 2702 | + | return _c | |||
| 2703 | + | } | |||
| 2704 | + | ||||
| 2705 | + | // UpdateRoute provides a mock function for the type MockControlPlane | |||
| 2706 | + | func (_mock *MockControlPlane) UpdateRoute(ctx context.Context, route domain.Route) error { | |||
| 2707 | + | ret := _mock.Called(ctx, route) | |||
| 2708 | + | ||||
| 2709 | + | if len(ret) == 0 { | |||
| 2710 | + | panic("no return value specified for UpdateRoute") | |||
| 2711 | + | } | |||
| 2712 | + | ||||
| 2713 | + | var r0 error | |||
| 2714 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Route) error); ok { | |||
| 2715 | + | r0 = returnFunc(ctx, route) | |||
| 2716 | + | } else { | |||
| 2717 | + | r0 = ret.Error(0) | |||
| 2718 | + | } | |||
| 2719 | + | return r0 | |||
| 2720 | + | } | |||
| 2721 | + | ||||
| 2722 | + | // MockControlPlane_UpdateRoute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRoute' | |||
| 2723 | + | type MockControlPlane_UpdateRoute_Call struct { | |||
| 2724 | + | *mock.Call | |||
| 2725 | + | } | |||
| 2726 | + | ||||
| 2727 | + | // UpdateRoute is a helper method to define mock.On call | |||
| 2728 | + | // - ctx context.Context | |||
| 2729 | + | // - route domain.Route | |||
| 2730 | + | func (_e *MockControlPlane_Expecter) UpdateRoute(ctx interface{}, route interface{}) *MockControlPlane_UpdateRoute_Call { | |||
| 2731 | + | return &MockControlPlane_UpdateRoute_Call{Call: _e.mock.On("UpdateRoute", ctx, route)} | |||
| 2732 | + | } | |||
| 2733 | + | ||||
| 2734 | + | func (_c *MockControlPlane_UpdateRoute_Call) Run(run func(ctx context.Context, route domain.Route)) *MockControlPlane_UpdateRoute_Call { | |||
| 2735 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 2736 | + | var arg0 context.Context | |||
| 2737 | + | if args[0] != nil { | |||
| 2738 | + | arg0 = args[0].(context.Context) | |||
| 2739 | + | } | |||
| 2740 | + | var arg1 domain.Route | |||
| 2741 | + | if args[1] != nil { | |||
| 2742 | + | arg1 = args[1].(domain.Route) | |||
| 2743 | + | } | |||
| 2744 | + | run( | |||
| 2745 | + | arg0, | |||
| 2746 | + | arg1, | |||
| 2747 | + | ) | |||
| 2748 | + | }) | |||
| 2749 | + | return _c | |||
| 2750 | + | } | |||
| 2751 | + | ||||
| 2752 | + | func (_c *MockControlPlane_UpdateRoute_Call) Return(err error) *MockControlPlane_UpdateRoute_Call { | |||
| 2753 | + | _c.Call.Return(err) | |||
| 2754 | + | return _c | |||
| 2755 | + | } | |||
| 2756 | + | ||||
| 2757 | + | func (_c *MockControlPlane_UpdateRoute_Call) RunAndReturn(run func(ctx context.Context, route domain.Route) error) *MockControlPlane_UpdateRoute_Call { | |||
| 2758 | + | _c.Call.Return(run) | |||
| 2759 | + | return _c | |||
| 2760 | + | } | |||
M internal/adapters/in/cli/push_test.go +8 -0
| @@ -90,6 +90,14 @@ func (c *resolveFromImageTestControlPlane) GetAttachmentsConfig(context.Context, | |||
| 90 | 90 | panic("unexpected call") | |
| 91 | 91 | } | |
| 92 | 92 | ||
| 93 | + | func (c *resolveFromImageTestControlPlane) ListOrphanedAttachments(context.Context) ([]domain.CleanupAttachment, error) { | |
| 94 | + | panic("unexpected call") | |
| 95 | + | } | |
| 96 | + | ||
| 97 | + | func (c *resolveFromImageTestControlPlane) CleanupOrphanedAttachments(context.Context, string, bool) (*domain.CleanupReport, error) { | |
| 98 | + | panic("unexpected call") | |
| 99 | + | } | |
| 100 | + | ||
| 93 | 101 | func (c *resolveFromImageTestControlPlane) FindAttachmentTargetsByImage(context.Context, string) ([]string, error) { | |
| 94 | 102 | panic("unexpected call") | |
| 95 | 103 | } | |
| @@ -90,6 +90,14 @@ func (c *resolveFromImageTestControlPlane) GetAttachmentsConfig(context.Context, | |||||
| 90 | panic("unexpected call") | 90 | panic("unexpected call") | ||
| 91 | } | 91 | } | ||
| 92 | 92 | ||||
| 93 | + | func (c *resolveFromImageTestControlPlane) ListOrphanedAttachments(context.Context) ([]domain.CleanupAttachment, error) { | |||
| 94 | + | panic("unexpected call") | |||
| 95 | + | } | |||
| 96 | + | ||||
| 97 | + | func (c *resolveFromImageTestControlPlane) CleanupOrphanedAttachments(context.Context, string, bool) (*domain.CleanupReport, error) { | |||
| 98 | + | panic("unexpected call") | |||
| 99 | + | } | |||
| 100 | + | ||||
| 93 | func (c *resolveFromImageTestControlPlane) FindAttachmentTargetsByImage(context.Context, string) ([]string, error) { | 101 | func (c *resolveFromImageTestControlPlane) FindAttachmentTargetsByImage(context.Context, string) ([]string, error) { | ||
| 94 | panic("unexpected call") | 102 | panic("unexpected call") | ||
| 95 | } | 103 | } | ||
M internal/adapters/in/cli/routes_test.go +21 -54
| @@ -13,7 +13,7 @@ import ( | |||
| 13 | 13 | "sync/atomic" | |
| 14 | 14 | "testing" | |
| 15 | 15 | ||
| 16 | - | "github.com/bnema/gordon/internal/adapters/dto" | |
| 16 | + | climocks "github.com/bnema/gordon/internal/adapters/in/cli/mocks" | |
| 17 | 17 | "github.com/bnema/gordon/internal/adapters/in/cli/remote" | |
| 18 | 18 | "github.com/bnema/gordon/internal/adapters/in/cli/ui/components" | |
| 19 | 19 | "github.com/bnema/gordon/internal/adapters/in/cli/ui/styles" | |
| @@ -40,6 +40,14 @@ func (c *routesShowTestControlPlane) GetHealth(ctx context.Context) (map[string] | |||
| 40 | 40 | panic("unexpected call") | |
| 41 | 41 | } | |
| 42 | 42 | ||
| 43 | + | func (c *routesShowTestControlPlane) ListOrphanedAttachments(context.Context) ([]domain.CleanupAttachment, error) { | |
| 44 | + | panic("unexpected call") | |
| 45 | + | } | |
| 46 | + | ||
| 47 | + | func (c *routesShowTestControlPlane) CleanupOrphanedAttachments(context.Context, string, bool) (*domain.CleanupReport, error) { | |
| 48 | + | panic("unexpected call") | |
| 49 | + | } | |
| 50 | + | ||
| 43 | 51 | func TestTruncateImage(t *testing.T) { | |
| 44 | 52 | tests := []struct { | |
| 45 | 53 | name string | |
| @@ -945,65 +953,24 @@ func TestAttachmentsForRouteDiagnosisUsesOwner(t *testing.T) { | |||
| 945 | 953 | } | |
| 946 | 954 | ||
| 947 | 955 | func TestRunRoutePurge_AttachmentsForceIsScopedToRoute(t *testing.T) { | |
| 948 | - | cp := &routePurgeTestControlPlane{ | |
| 949 | - | route: &domain.Route{Domain: "app.example.com", Image: "app:latest"}, | |
| 950 | - | orphanedAttachments: []domain.CleanupAttachment{ | |
| 951 | - | {ContainerID: "app-attachment", Owner: "app.example.com", Name: "postgres"}, | |
| 952 | - | {ContainerID: "other-attachment", Owner: "other.example.com", Name: "redis"}, | |
| 953 | - | }, | |
| 956 | + | cp := climocks.NewMockControlPlane(t) | |
| 957 | + | orphanedAttachments := []domain.CleanupAttachment{ | |
| 958 | + | {ContainerID: "app-attachment", Owner: "app.example.com", Name: "postgres"}, | |
| 959 | + | {ContainerID: "other-attachment", Owner: "other.example.com", Name: "redis"}, | |
| 954 | 960 | } | |
| 961 | + | cp.EXPECT().GetRoute(context.Background(), "app.example.com").Return(&domain.Route{Domain: "app.example.com", Image: "app:latest"}, nil).Once() | |
| 962 | + | cp.EXPECT().ListRoutesWithDetails(context.Background()).Return(nil, nil).Once() | |
| 963 | + | cp.EXPECT().GetHealth(context.Background()).Return(nil, nil).Once() | |
| 964 | + | cp.EXPECT().ListVolumes(context.Background()).Return(nil, nil).Once() | |
| 965 | + | cp.EXPECT().ListOrphanedAttachments(context.Background()).Return(orphanedAttachments, nil).Once() | |
| 966 | + | cp.EXPECT().CleanupOrphanedAttachments(context.Background(), "app.example.com", true).Return(&domain.CleanupReport{ | |
| 967 | + | RemovedContainers: []domain.CleanupContainer{{ID: "app-attachment", Name: "postgres"}}, | |
| 968 | + | }, nil).Once() | |
| 955 | 969 | ||
| 956 | 970 | report, err := runRoutePurge(context.Background(), cp, "app.example.com", routePurgeOptions{Force: true, Attachments: true}) | |
| 957 | 971 | ||
| 958 | 972 | require.NoError(t, err) | |
| 959 | 973 | require.NotNil(t, report) | |
| 960 | - | require.Len(t, cp.cleanedAttachments, 1) | |
| 961 | - | assert.Equal(t, "app-attachment", cp.cleanedAttachments[0].ContainerID) | |
| 962 | 974 | require.Len(t, report.RemovedContainers, 1) | |
| 963 | 975 | assert.Equal(t, "app-attachment", report.RemovedContainers[0].ID) | |
| 964 | 976 | } | |
| 965 | - | ||
| 966 | - | type routePurgeTestControlPlane struct { | |
| 967 | - | resolveFromImageTestControlPlane | |
| 968 | - | route *domain.Route | |
| 969 | - | orphanedAttachments []domain.CleanupAttachment | |
| 970 | - | cleanedAttachments []domain.CleanupAttachment | |
| 971 | - | } | |
| 972 | - | ||
| 973 | - | func (c *routePurgeTestControlPlane) GetRoute(context.Context, string) (*domain.Route, error) { | |
| 974 | - | if c.route == nil { | |
| 975 | - | return nil, domain.ErrRouteNotFound | |
| 976 | - | } | |
| 977 | - | return c.route, nil | |
| 978 | - | } | |
| 979 | - | ||
| 980 | - | func (c *routePurgeTestControlPlane) ListRoutesWithDetails(context.Context) ([]remote.RouteInfo, error) { | |
| 981 | - | return nil, nil | |
| 982 | - | } | |
| 983 | - | ||
| 984 | - | func (c *routePurgeTestControlPlane) GetHealth(context.Context) (map[string]*remote.RouteHealth, error) { | |
| 985 | - | return nil, nil | |
| 986 | - | } | |
| 987 | - | ||
| 988 | - | func (c *routePurgeTestControlPlane) ListVolumes(context.Context) ([]dto.Volume, error) { | |
| 989 | - | return nil, nil | |
| 990 | - | } | |
| 991 | - | ||
| 992 | - | func (c *routePurgeTestControlPlane) ListOrphanedAttachments(context.Context) ([]domain.CleanupAttachment, error) { | |
| 993 | - | return c.orphanedAttachments, nil | |
| 994 | - | } | |
| 995 | - | ||
| 996 | - | func (c *routePurgeTestControlPlane) CleanupOrphanedAttachments(_ context.Context, owner string, stop bool) (*domain.CleanupReport, error) { | |
| 997 | - | if !stop { | |
| 998 | - | return &domain.CleanupReport{}, nil | |
| 999 | - | } | |
| 1000 | - | var report domain.CleanupReport | |
| 1001 | - | for _, attachment := range c.orphanedAttachments { | |
| 1002 | - | if attachment.Owner != owner { | |
| 1003 | - | continue | |
| 1004 | - | } | |
| 1005 | - | c.cleanedAttachments = append(c.cleanedAttachments, attachment) | |
| 1006 | - | report.RemovedContainers = append(report.RemovedContainers, domain.CleanupContainer{ID: attachment.ContainerID, Name: attachment.Name}) | |
| 1007 | - | } | |
| 1008 | - | return &report, nil | |
| 1009 | - | } | |
| @@ -13,7 +13,7 @@ import ( | |||||
| 13 | "sync/atomic" | 13 | "sync/atomic" | ||
| 14 | "testing" | 14 | "testing" | ||
| 15 | 15 | ||||
| 16 | - | "github.com/bnema/gordon/internal/adapters/dto" | 16 | + | climocks "github.com/bnema/gordon/internal/adapters/in/cli/mocks" |
| 17 | "github.com/bnema/gordon/internal/adapters/in/cli/remote" | 17 | "github.com/bnema/gordon/internal/adapters/in/cli/remote" | ||
| 18 | "github.com/bnema/gordon/internal/adapters/in/cli/ui/components" | 18 | "github.com/bnema/gordon/internal/adapters/in/cli/ui/components" | ||
| 19 | "github.com/bnema/gordon/internal/adapters/in/cli/ui/styles" | 19 | "github.com/bnema/gordon/internal/adapters/in/cli/ui/styles" | ||
| @@ -40,6 +40,14 @@ func (c *routesShowTestControlPlane) GetHealth(ctx context.Context) (map[string] | |||||
| 40 | panic("unexpected call") | 40 | panic("unexpected call") | ||
| 41 | } | 41 | } | ||
| 42 | 42 | ||||
| 43 | + | func (c *routesShowTestControlPlane) ListOrphanedAttachments(context.Context) ([]domain.CleanupAttachment, error) { | |||
| 44 | + | panic("unexpected call") | |||
| 45 | + | } | |||
| 46 | + | ||||
| 47 | + | func (c *routesShowTestControlPlane) CleanupOrphanedAttachments(context.Context, string, bool) (*domain.CleanupReport, error) { | |||
| 48 | + | panic("unexpected call") | |||
| 49 | + | } | |||
| 50 | + | ||||
| 43 | func TestTruncateImage(t *testing.T) { | 51 | func TestTruncateImage(t *testing.T) { | ||
| 44 | tests := []struct { | 52 | tests := []struct { | ||
| 45 | name string | 53 | name string | ||
| @@ -945,65 +953,24 @@ func TestAttachmentsForRouteDiagnosisUsesOwner(t *testing.T) { | |||||
| 945 | } | 953 | } | ||
| 946 | 954 | ||||
| 947 | func TestRunRoutePurge_AttachmentsForceIsScopedToRoute(t *testing.T) { | 955 | func TestRunRoutePurge_AttachmentsForceIsScopedToRoute(t *testing.T) { | ||
| 948 | - | cp := &routePurgeTestControlPlane{ | 956 | + | cp := climocks.NewMockControlPlane(t) |
| 949 | - | route: &domain.Route{Domain: "app.example.com", Image: "app:latest"}, | 957 | + | orphanedAttachments := []domain.CleanupAttachment{ |
| 950 | - | orphanedAttachments: []domain.CleanupAttachment{ | 958 | + | {ContainerID: "app-attachment", Owner: "app.example.com", Name: "postgres"}, |
| 951 | - | {ContainerID: "app-attachment", Owner: "app.example.com", Name: "postgres"}, | 959 | + | {ContainerID: "other-attachment", Owner: "other.example.com", Name: "redis"}, |
| 952 | - | {ContainerID: "other-attachment", Owner: "other.example.com", Name: "redis"}, | |||
| 953 | - | }, | |||
| 954 | } | 960 | } | ||
| 961 | + | cp.EXPECT().GetRoute(context.Background(), "app.example.com").Return(&domain.Route{Domain: "app.example.com", Image: "app:latest"}, nil).Once() | |||
| 962 | + | cp.EXPECT().ListRoutesWithDetails(context.Background()).Return(nil, nil).Once() | |||
| 963 | + | cp.EXPECT().GetHealth(context.Background()).Return(nil, nil).Once() | |||
| 964 | + | cp.EXPECT().ListVolumes(context.Background()).Return(nil, nil).Once() | |||
| 965 | + | cp.EXPECT().ListOrphanedAttachments(context.Background()).Return(orphanedAttachments, nil).Once() | |||
| 966 | + | cp.EXPECT().CleanupOrphanedAttachments(context.Background(), "app.example.com", true).Return(&domain.CleanupReport{ | |||
| 967 | + | RemovedContainers: []domain.CleanupContainer{{ID: "app-attachment", Name: "postgres"}}, | |||
| 968 | + | }, nil).Once() | |||
| 955 | 969 | ||||
| 956 | report, err := runRoutePurge(context.Background(), cp, "app.example.com", routePurgeOptions{Force: true, Attachments: true}) | 970 | report, err := runRoutePurge(context.Background(), cp, "app.example.com", routePurgeOptions{Force: true, Attachments: true}) | ||
| 957 | 971 | ||||
| 958 | require.NoError(t, err) | 972 | require.NoError(t, err) | ||
| 959 | require.NotNil(t, report) | 973 | require.NotNil(t, report) | ||
| 960 | - | require.Len(t, cp.cleanedAttachments, 1) | |||
| 961 | - | assert.Equal(t, "app-attachment", cp.cleanedAttachments[0].ContainerID) | |||
| 962 | require.Len(t, report.RemovedContainers, 1) | 974 | require.Len(t, report.RemovedContainers, 1) | ||
| 963 | assert.Equal(t, "app-attachment", report.RemovedContainers[0].ID) | 975 | assert.Equal(t, "app-attachment", report.RemovedContainers[0].ID) | ||
| 964 | } | 976 | } | ||
| 965 | - | ||||
| 966 | - | type routePurgeTestControlPlane struct { | |||
| 967 | - | resolveFromImageTestControlPlane | |||
| 968 | - | route *domain.Route | |||
| 969 | - | orphanedAttachments []domain.CleanupAttachment | |||
| 970 | - | cleanedAttachments []domain.CleanupAttachment | |||
| 971 | - | } | |||
| 972 | - | ||||
| 973 | - | func (c *routePurgeTestControlPlane) GetRoute(context.Context, string) (*domain.Route, error) { | |||
| 974 | - | if c.route == nil { | |||
| 975 | - | return nil, domain.ErrRouteNotFound | |||
| 976 | - | } | |||
| 977 | - | return c.route, nil | |||
| 978 | - | } | |||
| 979 | - | ||||
| 980 | - | func (c *routePurgeTestControlPlane) ListRoutesWithDetails(context.Context) ([]remote.RouteInfo, error) { | |||
| 981 | - | return nil, nil | |||
| 982 | - | } | |||
| 983 | - | ||||
| 984 | - | func (c *routePurgeTestControlPlane) GetHealth(context.Context) (map[string]*remote.RouteHealth, error) { | |||
| 985 | - | return nil, nil | |||
| 986 | - | } | |||
| 987 | - | ||||
| 988 | - | func (c *routePurgeTestControlPlane) ListVolumes(context.Context) ([]dto.Volume, error) { | |||
| 989 | - | return nil, nil | |||
| 990 | - | } | |||
| 991 | - | ||||
| 992 | - | func (c *routePurgeTestControlPlane) ListOrphanedAttachments(context.Context) ([]domain.CleanupAttachment, error) { | |||
| 993 | - | return c.orphanedAttachments, nil | |||
| 994 | - | } | |||
| 995 | - | ||||
| 996 | - | func (c *routePurgeTestControlPlane) CleanupOrphanedAttachments(_ context.Context, owner string, stop bool) (*domain.CleanupReport, error) { | |||
| 997 | - | if !stop { | |||
| 998 | - | return &domain.CleanupReport{}, nil | |||
| 999 | - | } | |||
| 1000 | - | var report domain.CleanupReport | |||
| 1001 | - | for _, attachment := range c.orphanedAttachments { | |||
| 1002 | - | if attachment.Owner != owner { | |||
| 1003 | - | continue | |||
| 1004 | - | } | |||
| 1005 | - | c.cleanedAttachments = append(c.cleanedAttachments, attachment) | |||
| 1006 | - | report.RemovedContainers = append(report.RemovedContainers, domain.CleanupContainer{ID: attachment.ContainerID, Name: attachment.Name}) | |||
| 1007 | - | } | |||
| 1008 | - | return &report, nil | |||
| 1009 | - | } | |||
M internal/adapters/in/cli/tls_test.go +8 -0
| @@ -82,6 +82,14 @@ func (c *tlsTestControlPlane) GetAttachmentsConfig(context.Context, string) ([]s | |||
| 82 | 82 | panic("unexpected call") | |
| 83 | 83 | } | |
| 84 | 84 | ||
| 85 | + | func (c *tlsTestControlPlane) ListOrphanedAttachments(context.Context) ([]domain.CleanupAttachment, error) { | |
| 86 | + | panic("unexpected call") | |
| 87 | + | } | |
| 88 | + | ||
| 89 | + | func (c *tlsTestControlPlane) CleanupOrphanedAttachments(context.Context, string, bool) (*domain.CleanupReport, error) { | |
| 90 | + | panic("unexpected call") | |
| 91 | + | } | |
| 92 | + | ||
| 85 | 93 | func (c *tlsTestControlPlane) FindAttachmentTargetsByImage(context.Context, string) ([]string, error) { | |
| 86 | 94 | panic("unexpected call") | |
| 87 | 95 | } | |
| @@ -82,6 +82,14 @@ func (c *tlsTestControlPlane) GetAttachmentsConfig(context.Context, string) ([]s | |||||
| 82 | panic("unexpected call") | 82 | panic("unexpected call") | ||
| 83 | } | 83 | } | ||
| 84 | 84 | ||||
| 85 | + | func (c *tlsTestControlPlane) ListOrphanedAttachments(context.Context) ([]domain.CleanupAttachment, error) { | |||
| 86 | + | panic("unexpected call") | |||
| 87 | + | } | |||
| 88 | + | ||||
| 89 | + | func (c *tlsTestControlPlane) CleanupOrphanedAttachments(context.Context, string, bool) (*domain.CleanupReport, error) { | |||
| 90 | + | panic("unexpected call") | |||
| 91 | + | } | |||
| 92 | + | ||||
| 85 | func (c *tlsTestControlPlane) FindAttachmentTargetsByImage(context.Context, string) ([]string, error) { | 93 | func (c *tlsTestControlPlane) FindAttachmentTargetsByImage(context.Context, string) ([]string, error) { | ||
| 86 | panic("unexpected call") | 94 | panic("unexpected call") | ||
| 87 | } | 95 | } | ||