-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobjectstore_mock_test.go
238 lines (201 loc) · 8.15 KB
/
objectstore_mock_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/juju/juju/core/objectstore (interfaces: ObjectStore)
//
// Generated by this command:
//
// mockgen -typed -package bootstrap -destination objectstore_mock_test.go github.com/juju/juju/core/objectstore ObjectStore
//
// Package bootstrap is a generated GoMock package.
package bootstrap
import (
context "context"
io "io"
reflect "reflect"
objectstore "github.com/juju/juju/core/objectstore"
gomock "go.uber.org/mock/gomock"
)
// MockObjectStore is a mock of ObjectStore interface.
type MockObjectStore struct {
ctrl *gomock.Controller
recorder *MockObjectStoreMockRecorder
}
// MockObjectStoreMockRecorder is the mock recorder for MockObjectStore.
type MockObjectStoreMockRecorder struct {
mock *MockObjectStore
}
// NewMockObjectStore creates a new mock instance.
func NewMockObjectStore(ctrl *gomock.Controller) *MockObjectStore {
mock := &MockObjectStore{ctrl: ctrl}
mock.recorder = &MockObjectStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockObjectStore) EXPECT() *MockObjectStoreMockRecorder {
return m.recorder
}
// Get mocks base method.
func (m *MockObjectStore) Get(arg0 context.Context, arg1 string) (io.ReadCloser, int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", arg0, arg1)
ret0, _ := ret[0].(io.ReadCloser)
ret1, _ := ret[1].(int64)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Get indicates an expected call of Get.
func (mr *MockObjectStoreMockRecorder) Get(arg0, arg1 any) *MockObjectStoreGetCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockObjectStore)(nil).Get), arg0, arg1)
return &MockObjectStoreGetCall{Call: call}
}
// MockObjectStoreGetCall wrap *gomock.Call
type MockObjectStoreGetCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockObjectStoreGetCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 error) *MockObjectStoreGetCall {
c.Call = c.Call.Return(arg0, arg1, arg2)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockObjectStoreGetCall) Do(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockObjectStoreGetCall) DoAndReturn(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// GetBySHA256Prefix mocks base method.
func (m *MockObjectStore) GetBySHA256Prefix(arg0 context.Context, arg1 string) (io.ReadCloser, int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBySHA256Prefix", arg0, arg1)
ret0, _ := ret[0].(io.ReadCloser)
ret1, _ := ret[1].(int64)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetBySHA256Prefix indicates an expected call of GetBySHA256Prefix.
func (mr *MockObjectStoreMockRecorder) GetBySHA256Prefix(arg0, arg1 any) *MockObjectStoreGetBySHA256PrefixCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBySHA256Prefix", reflect.TypeOf((*MockObjectStore)(nil).GetBySHA256Prefix), arg0, arg1)
return &MockObjectStoreGetBySHA256PrefixCall{Call: call}
}
// MockObjectStoreGetBySHA256PrefixCall wrap *gomock.Call
type MockObjectStoreGetBySHA256PrefixCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockObjectStoreGetBySHA256PrefixCall) Return(arg0 io.ReadCloser, arg1 int64, arg2 error) *MockObjectStoreGetBySHA256PrefixCall {
c.Call = c.Call.Return(arg0, arg1, arg2)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockObjectStoreGetBySHA256PrefixCall) Do(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetBySHA256PrefixCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockObjectStoreGetBySHA256PrefixCall) DoAndReturn(f func(context.Context, string) (io.ReadCloser, int64, error)) *MockObjectStoreGetBySHA256PrefixCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Put mocks base method.
func (m *MockObjectStore) Put(arg0 context.Context, arg1 string, arg2 io.Reader, arg3 int64) (objectstore.UUID, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Put", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(objectstore.UUID)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Put indicates an expected call of Put.
func (mr *MockObjectStoreMockRecorder) Put(arg0, arg1, arg2, arg3 any) *MockObjectStorePutCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockObjectStore)(nil).Put), arg0, arg1, arg2, arg3)
return &MockObjectStorePutCall{Call: call}
}
// MockObjectStorePutCall wrap *gomock.Call
type MockObjectStorePutCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockObjectStorePutCall) Return(arg0 objectstore.UUID, arg1 error) *MockObjectStorePutCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockObjectStorePutCall) Do(f func(context.Context, string, io.Reader, int64) (objectstore.UUID, error)) *MockObjectStorePutCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockObjectStorePutCall) DoAndReturn(f func(context.Context, string, io.Reader, int64) (objectstore.UUID, error)) *MockObjectStorePutCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// PutAndCheckHash mocks base method.
func (m *MockObjectStore) PutAndCheckHash(arg0 context.Context, arg1 string, arg2 io.Reader, arg3 int64, arg4 string) (objectstore.UUID, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PutAndCheckHash", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(objectstore.UUID)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PutAndCheckHash indicates an expected call of PutAndCheckHash.
func (mr *MockObjectStoreMockRecorder) PutAndCheckHash(arg0, arg1, arg2, arg3, arg4 any) *MockObjectStorePutAndCheckHashCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutAndCheckHash", reflect.TypeOf((*MockObjectStore)(nil).PutAndCheckHash), arg0, arg1, arg2, arg3, arg4)
return &MockObjectStorePutAndCheckHashCall{Call: call}
}
// MockObjectStorePutAndCheckHashCall wrap *gomock.Call
type MockObjectStorePutAndCheckHashCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockObjectStorePutAndCheckHashCall) Return(arg0 objectstore.UUID, arg1 error) *MockObjectStorePutAndCheckHashCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockObjectStorePutAndCheckHashCall) Do(f func(context.Context, string, io.Reader, int64, string) (objectstore.UUID, error)) *MockObjectStorePutAndCheckHashCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockObjectStorePutAndCheckHashCall) DoAndReturn(f func(context.Context, string, io.Reader, int64, string) (objectstore.UUID, error)) *MockObjectStorePutAndCheckHashCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Remove mocks base method.
func (m *MockObjectStore) Remove(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Remove", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Remove indicates an expected call of Remove.
func (mr *MockObjectStoreMockRecorder) Remove(arg0, arg1 any) *MockObjectStoreRemoveCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockObjectStore)(nil).Remove), arg0, arg1)
return &MockObjectStoreRemoveCall{Call: call}
}
// MockObjectStoreRemoveCall wrap *gomock.Call
type MockObjectStoreRemoveCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockObjectStoreRemoveCall) Return(arg0 error) *MockObjectStoreRemoveCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockObjectStoreRemoveCall) Do(f func(context.Context, string) error) *MockObjectStoreRemoveCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockObjectStoreRemoveCall) DoAndReturn(f func(context.Context, string) error) *MockObjectStoreRemoveCall {
c.Call = c.Call.DoAndReturn(f)
return c
}