mock_container_service.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 "github.com/bnema/gordon/internal/domain"
11 mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockContainerService creates a new instance of MockContainerService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMockContainerService(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *MockContainerService {
20 if helper, ok := t.(interface{ Helper() }); ok {
21 helper.Helper()
22 }
23
24 mock := &MockContainerService{}
25 mock.Mock.Test(t)
26
27 t.Cleanup(func() {
28 if helper, ok := t.(interface{ Helper() }); ok {
29 helper.Helper()
30 }
31 mock.AssertExpectations(t)
32 })
33
34 return mock
35}
36
37// MockContainerService is an autogenerated mock type for the ContainerService type
38type MockContainerService struct {
39 mock.Mock
40}
41
42type MockContainerService_Expecter struct {
43 mock *mock.Mock
44}
45
46func (_m *MockContainerService) EXPECT() *MockContainerService_Expecter {
47 return &MockContainerService_Expecter{mock: &_m.Mock}
48}
49
50// ListNetworks provides a mock function for the type MockContainerService
51func (_mock *MockContainerService) ListNetworks(ctx context.Context) ([]*domain.NetworkInfo, error) {
52 ret := _mock.Called(ctx)
53
54 if len(ret) == 0 {
55 panic("no return value specified for ListNetworks")
56 }
57
58 var r0 []*domain.NetworkInfo
59 var r1 error
60 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*domain.NetworkInfo, error)); ok {
61 return returnFunc(ctx)
62 }
63 if returnFunc, ok := ret.Get(0).(func(context.Context) []*domain.NetworkInfo); ok {
64 r0 = returnFunc(ctx)
65 } else {
66 if ret.Get(0) != nil {
67 r0 = ret.Get(0).([]*domain.NetworkInfo)
68 }
69 }
70 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
71 r1 = returnFunc(ctx)
72 } else {
73 r1 = ret.Error(1)
74 }
75 return r0, r1
76}
77
78// MockContainerService_ListNetworks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNetworks'
79type MockContainerService_ListNetworks_Call struct {
80 *mock.Call
81}
82
83// ListNetworks is a helper method to define mock.On call
84// - ctx context.Context
85func (_e *MockContainerService_Expecter) ListNetworks(ctx any) *MockContainerService_ListNetworks_Call {
86 return &MockContainerService_ListNetworks_Call{Call: _e.mock.On("ListNetworks", ctx)}
87}
88
89func (_c *MockContainerService_ListNetworks_Call) Run(run func(ctx context.Context)) *MockContainerService_ListNetworks_Call {
90 _c.Call.Run(func(args mock.Arguments) {
91 var arg0 context.Context
92 if args[0] != nil {
93 arg0 = args[0].(context.Context)
94 }
95 run(
96 arg0,
97 )
98 })
99 return _c
100}
101
102func (_c *MockContainerService_ListNetworks_Call) Return(networkInfos []*domain.NetworkInfo, err error) *MockContainerService_ListNetworks_Call {
103 _c.Call.Return(networkInfos, err)
104 return _c
105}
106
107func (_c *MockContainerService_ListNetworks_Call) RunAndReturn(run func(ctx context.Context) ([]*domain.NetworkInfo, error)) *MockContainerService_ListNetworks_Call {
108 _c.Call.Return(run)
109 return _c
110}
111
112// Shutdown provides a mock function for the type MockContainerService
113func (_mock *MockContainerService) Shutdown(ctx context.Context) error {
114 ret := _mock.Called(ctx)
115
116 if len(ret) == 0 {
117 panic("no return value specified for Shutdown")
118 }
119
120 var r0 error
121 if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
122 r0 = returnFunc(ctx)
123 } else {
124 r0 = ret.Error(0)
125 }
126 return r0
127}
128
129// MockContainerService_Shutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shutdown'
130type MockContainerService_Shutdown_Call struct {
131 *mock.Call
132}
133
134// Shutdown is a helper method to define mock.On call
135// - ctx context.Context
136func (_e *MockContainerService_Expecter) Shutdown(ctx any) *MockContainerService_Shutdown_Call {
137 return &MockContainerService_Shutdown_Call{Call: _e.mock.On("Shutdown", ctx)}
138}
139
140func (_c *MockContainerService_Shutdown_Call) Run(run func(ctx context.Context)) *MockContainerService_Shutdown_Call {
141 _c.Call.Run(func(args mock.Arguments) {
142 var arg0 context.Context
143 if args[0] != nil {
144 arg0 = args[0].(context.Context)
145 }
146 run(
147 arg0,
148 )
149 })
150 return _c
151}
152
153func (_c *MockContainerService_Shutdown_Call) Return(err error) *MockContainerService_Shutdown_Call {
154 _c.Call.Return(err)
155 return _c
156}
157
158func (_c *MockContainerService_Shutdown_Call) RunAndReturn(run func(ctx context.Context) error) *MockContainerService_Shutdown_Call {
159 _c.Call.Return(run)
160 return _c
161}