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// NewMockPruneRuntime creates a new instance of MockPruneRuntime. 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 NewMockPruneRuntime(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *MockPruneRuntime {
20 if helper, ok := t.(interface{ Helper() }); ok {
21 helper.Helper()
22 }
23
24 mock := &MockPruneRuntime{}
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// MockPruneRuntime is an autogenerated mock type for the PruneRuntime type
38type MockPruneRuntime struct {
39 mock.Mock
40}
41
42type MockPruneRuntime_Expecter struct {
43 mock *mock.Mock
44}
45
46func (_m *MockPruneRuntime) EXPECT() *MockPruneRuntime_Expecter {
47 return &MockPruneRuntime_Expecter{mock: &_m.Mock}
48}
49
50// InventoryRuntime provides a mock function for the type MockPruneRuntime
51func (_mock *MockPruneRuntime) InventoryRuntime(ctx context.Context) (*domain.RuntimeInventory, error) {
52 ret := _mock.Called(ctx)
53
54 if len(ret) == 0 {
55 panic("no return value specified for InventoryRuntime")
56 }
57
58 var r0 *domain.RuntimeInventory
59 var r1 error
60 if returnFunc, ok := ret.Get(0).(func(context.Context) (*domain.RuntimeInventory, error)); ok {
61 return returnFunc(ctx)
62 }
63 if returnFunc, ok := ret.Get(0).(func(context.Context) *domain.RuntimeInventory); ok {
64 r0 = returnFunc(ctx)
65 } else {
66 if ret.Get(0) != nil {
67 r0 = ret.Get(0).(*domain.RuntimeInventory)
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// MockPruneRuntime_InventoryRuntime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InventoryRuntime'
79type MockPruneRuntime_InventoryRuntime_Call struct {
80 *mock.Call
81}
82
83// InventoryRuntime is a helper method to define mock.On call
84// - ctx context.Context
85func (_e *MockPruneRuntime_Expecter) InventoryRuntime(ctx any) *MockPruneRuntime_InventoryRuntime_Call {
86 return &MockPruneRuntime_InventoryRuntime_Call{Call: _e.mock.On("InventoryRuntime", ctx)}
87}
88
89func (_c *MockPruneRuntime_InventoryRuntime_Call) Run(run func(ctx context.Context)) *MockPruneRuntime_InventoryRuntime_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 *MockPruneRuntime_InventoryRuntime_Call) Return(runtimeInventory *domain.RuntimeInventory, err error) *MockPruneRuntime_InventoryRuntime_Call {
103 _c.Call.Return(runtimeInventory, err)
104 return _c
105}
106
107func (_c *MockPruneRuntime_InventoryRuntime_Call) RunAndReturn(run func(ctx context.Context) (*domain.RuntimeInventory, error)) *MockPruneRuntime_InventoryRuntime_Call {
108 _c.Call.Return(run)
109 return _c
110}
111
112// RemoveImageExact provides a mock function for the type MockPruneRuntime
113func (_mock *MockPruneRuntime) RemoveImageExact(ctx context.Context, ref domain.RuntimeImageRef) error {
114 ret := _mock.Called(ctx, ref)
115
116 if len(ret) == 0 {
117 panic("no return value specified for RemoveImageExact")
118 }
119
120 var r0 error
121 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RuntimeImageRef) error); ok {
122 r0 = returnFunc(ctx, ref)
123 } else {
124 r0 = ret.Error(0)
125 }
126 return r0
127}
128
129// MockPruneRuntime_RemoveImageExact_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveImageExact'
130type MockPruneRuntime_RemoveImageExact_Call struct {
131 *mock.Call
132}
133
134// RemoveImageExact is a helper method to define mock.On call
135// - ctx context.Context
136// - ref domain.RuntimeImageRef
137func (_e *MockPruneRuntime_Expecter) RemoveImageExact(ctx any, ref any) *MockPruneRuntime_RemoveImageExact_Call {
138 return &MockPruneRuntime_RemoveImageExact_Call{Call: _e.mock.On("RemoveImageExact", ctx, ref)}
139}
140
141func (_c *MockPruneRuntime_RemoveImageExact_Call) Run(run func(ctx context.Context, ref domain.RuntimeImageRef)) *MockPruneRuntime_RemoveImageExact_Call {
142 _c.Call.Run(func(args mock.Arguments) {
143 var arg0 context.Context
144 if args[0] != nil {
145 arg0 = args[0].(context.Context)
146 }
147 var arg1 domain.RuntimeImageRef
148 if args[1] != nil {
149 arg1 = args[1].(domain.RuntimeImageRef)
150 }
151 run(
152 arg0,
153 arg1,
154 )
155 })
156 return _c
157}
158
159func (_c *MockPruneRuntime_RemoveImageExact_Call) Return(err error) *MockPruneRuntime_RemoveImageExact_Call {
160 _c.Call.Return(err)
161 return _c
162}
163
164func (_c *MockPruneRuntime_RemoveImageExact_Call) RunAndReturn(run func(ctx context.Context, ref domain.RuntimeImageRef) error) *MockPruneRuntime_RemoveImageExact_Call {
165 _c.Call.Return(run)
166 return _c
167}
168
169// RemoveVolumeExact provides a mock function for the type MockPruneRuntime
170func (_mock *MockPruneRuntime) RemoveVolumeExact(ctx context.Context, ref domain.RuntimeVolumeRef) error {
171 ret := _mock.Called(ctx, ref)
172
173 if len(ret) == 0 {
174 panic("no return value specified for RemoveVolumeExact")
175 }
176
177 var r0 error
178 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RuntimeVolumeRef) error); ok {
179 r0 = returnFunc(ctx, ref)
180 } else {
181 r0 = ret.Error(0)
182 }
183 return r0
184}
185
186// MockPruneRuntime_RemoveVolumeExact_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveVolumeExact'
187type MockPruneRuntime_RemoveVolumeExact_Call struct {
188 *mock.Call
189}
190
191// RemoveVolumeExact is a helper method to define mock.On call
192// - ctx context.Context
193// - ref domain.RuntimeVolumeRef
194func (_e *MockPruneRuntime_Expecter) RemoveVolumeExact(ctx any, ref any) *MockPruneRuntime_RemoveVolumeExact_Call {
195 return &MockPruneRuntime_RemoveVolumeExact_Call{Call: _e.mock.On("RemoveVolumeExact", ctx, ref)}
196}
197
198func (_c *MockPruneRuntime_RemoveVolumeExact_Call) Run(run func(ctx context.Context, ref domain.RuntimeVolumeRef)) *MockPruneRuntime_RemoveVolumeExact_Call {
199 _c.Call.Run(func(args mock.Arguments) {
200 var arg0 context.Context
201 if args[0] != nil {
202 arg0 = args[0].(context.Context)
203 }
204 var arg1 domain.RuntimeVolumeRef
205 if args[1] != nil {
206 arg1 = args[1].(domain.RuntimeVolumeRef)
207 }
208 run(
209 arg0,
210 arg1,
211 )
212 })
213 return _c
214}
215
216func (_c *MockPruneRuntime_RemoveVolumeExact_Call) Return(err error) *MockPruneRuntime_RemoveVolumeExact_Call {
217 _c.Call.Return(err)
218 return _c
219}
220
221func (_c *MockPruneRuntime_RemoveVolumeExact_Call) RunAndReturn(run func(ctx context.Context, ref domain.RuntimeVolumeRef) error) *MockPruneRuntime_RemoveVolumeExact_Call {
222 _c.Call.Return(run)
223 return _c
224}