aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/gcs
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2025-03-27 14:51:12 +0100
committerTaras Madan <tarasmadan@google.com>2025-03-28 08:52:18 +0000
commit49900278f682d353c51ae499d241e49f0e538f9d (patch)
treea2c099df01886c8cb67d2a8daf647644f178c20c /pkg/gcs
parenta65c9492058d5c652f85e6b03185b569eae6873d (diff)
all/mocks: update
Diffstat (limited to 'pkg/gcs')
-rw-r--r--pkg/gcs/mocks/Client.go205
1 files changed, 205 insertions, 0 deletions
diff --git a/pkg/gcs/mocks/Client.go b/pkg/gcs/mocks/Client.go
index a6c1351ad..fff5dddd7 100644
--- a/pkg/gcs/mocks/Client.go
+++ b/pkg/gcs/mocks/Client.go
@@ -15,6 +15,14 @@ type Client struct {
mock.Mock
}
+type Client_Expecter struct {
+ mock *mock.Mock
+}
+
+func (_m *Client) EXPECT() *Client_Expecter {
+ return &Client_Expecter{mock: &_m.Mock}
+}
+
// Close provides a mock function with no fields
func (_m *Client) Close() error {
ret := _m.Called()
@@ -33,6 +41,33 @@ func (_m *Client) Close() error {
return r0
}
+// Client_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
+type Client_Close_Call struct {
+ *mock.Call
+}
+
+// Close is a helper method to define mock.On call
+func (_e *Client_Expecter) Close() *Client_Close_Call {
+ return &Client_Close_Call{Call: _e.mock.On("Close")}
+}
+
+func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ run()
+ })
+ return _c
+}
+
+func (_c *Client_Close_Call) Return(_a0 error) *Client_Close_Call {
+ _c.Call.Return(_a0)
+ return _c
+}
+
+func (_c *Client_Close_Call) RunAndReturn(run func() error) *Client_Close_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
// DeleteFile provides a mock function with given fields: path
func (_m *Client) DeleteFile(path string) error {
ret := _m.Called(path)
@@ -51,6 +86,34 @@ func (_m *Client) DeleteFile(path string) error {
return r0
}
+// Client_DeleteFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFile'
+type Client_DeleteFile_Call struct {
+ *mock.Call
+}
+
+// DeleteFile is a helper method to define mock.On call
+// - path string
+func (_e *Client_Expecter) DeleteFile(path interface{}) *Client_DeleteFile_Call {
+ return &Client_DeleteFile_Call{Call: _e.mock.On("DeleteFile", path)}
+}
+
+func (_c *Client_DeleteFile_Call) Run(run func(path string)) *Client_DeleteFile_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ run(args[0].(string))
+ })
+ return _c
+}
+
+func (_c *Client_DeleteFile_Call) Return(_a0 error) *Client_DeleteFile_Call {
+ _c.Call.Return(_a0)
+ return _c
+}
+
+func (_c *Client_DeleteFile_Call) RunAndReturn(run func(string) error) *Client_DeleteFile_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
// FileExists provides a mock function with given fields: path
func (_m *Client) FileExists(path string) (bool, error) {
ret := _m.Called(path)
@@ -79,6 +142,34 @@ func (_m *Client) FileExists(path string) (bool, error) {
return r0, r1
}
+// Client_FileExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileExists'
+type Client_FileExists_Call struct {
+ *mock.Call
+}
+
+// FileExists is a helper method to define mock.On call
+// - path string
+func (_e *Client_Expecter) FileExists(path interface{}) *Client_FileExists_Call {
+ return &Client_FileExists_Call{Call: _e.mock.On("FileExists", path)}
+}
+
+func (_c *Client_FileExists_Call) Run(run func(path string)) *Client_FileExists_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ run(args[0].(string))
+ })
+ return _c
+}
+
+func (_c *Client_FileExists_Call) Return(_a0 bool, _a1 error) *Client_FileExists_Call {
+ _c.Call.Return(_a0, _a1)
+ return _c
+}
+
+func (_c *Client_FileExists_Call) RunAndReturn(run func(string) (bool, error)) *Client_FileExists_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
// FileWriter provides a mock function with given fields: path, contentType, contentEncoding
func (_m *Client) FileWriter(path string, contentType string, contentEncoding string) (io.WriteCloser, error) {
ret := _m.Called(path, contentType, contentEncoding)
@@ -109,6 +200,36 @@ func (_m *Client) FileWriter(path string, contentType string, contentEncoding st
return r0, r1
}
+// Client_FileWriter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileWriter'
+type Client_FileWriter_Call struct {
+ *mock.Call
+}
+
+// FileWriter is a helper method to define mock.On call
+// - path string
+// - contentType string
+// - contentEncoding string
+func (_e *Client_Expecter) FileWriter(path interface{}, contentType interface{}, contentEncoding interface{}) *Client_FileWriter_Call {
+ return &Client_FileWriter_Call{Call: _e.mock.On("FileWriter", path, contentType, contentEncoding)}
+}
+
+func (_c *Client_FileWriter_Call) Run(run func(path string, contentType string, contentEncoding string)) *Client_FileWriter_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ run(args[0].(string), args[1].(string), args[2].(string))
+ })
+ return _c
+}
+
+func (_c *Client_FileWriter_Call) Return(_a0 io.WriteCloser, _a1 error) *Client_FileWriter_Call {
+ _c.Call.Return(_a0, _a1)
+ return _c
+}
+
+func (_c *Client_FileWriter_Call) RunAndReturn(run func(string, string, string) (io.WriteCloser, error)) *Client_FileWriter_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
// ListObjects provides a mock function with given fields: path
func (_m *Client) ListObjects(path string) ([]*gcs.Object, error) {
ret := _m.Called(path)
@@ -139,6 +260,34 @@ func (_m *Client) ListObjects(path string) ([]*gcs.Object, error) {
return r0, r1
}
+// Client_ListObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListObjects'
+type Client_ListObjects_Call struct {
+ *mock.Call
+}
+
+// ListObjects is a helper method to define mock.On call
+// - path string
+func (_e *Client_Expecter) ListObjects(path interface{}) *Client_ListObjects_Call {
+ return &Client_ListObjects_Call{Call: _e.mock.On("ListObjects", path)}
+}
+
+func (_c *Client_ListObjects_Call) Run(run func(path string)) *Client_ListObjects_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ run(args[0].(string))
+ })
+ return _c
+}
+
+func (_c *Client_ListObjects_Call) Return(_a0 []*gcs.Object, _a1 error) *Client_ListObjects_Call {
+ _c.Call.Return(_a0, _a1)
+ return _c
+}
+
+func (_c *Client_ListObjects_Call) RunAndReturn(run func(string) ([]*gcs.Object, error)) *Client_ListObjects_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
// Publish provides a mock function with given fields: path
func (_m *Client) Publish(path string) error {
ret := _m.Called(path)
@@ -157,6 +306,34 @@ func (_m *Client) Publish(path string) error {
return r0
}
+// Client_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish'
+type Client_Publish_Call struct {
+ *mock.Call
+}
+
+// Publish is a helper method to define mock.On call
+// - path string
+func (_e *Client_Expecter) Publish(path interface{}) *Client_Publish_Call {
+ return &Client_Publish_Call{Call: _e.mock.On("Publish", path)}
+}
+
+func (_c *Client_Publish_Call) Run(run func(path string)) *Client_Publish_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ run(args[0].(string))
+ })
+ return _c
+}
+
+func (_c *Client_Publish_Call) Return(_a0 error) *Client_Publish_Call {
+ _c.Call.Return(_a0)
+ return _c
+}
+
+func (_c *Client_Publish_Call) RunAndReturn(run func(string) error) *Client_Publish_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
// Read provides a mock function with given fields: path
func (_m *Client) Read(path string) (*gcs.File, error) {
ret := _m.Called(path)
@@ -187,6 +364,34 @@ func (_m *Client) Read(path string) (*gcs.File, error) {
return r0, r1
}
+// Client_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read'
+type Client_Read_Call struct {
+ *mock.Call
+}
+
+// Read is a helper method to define mock.On call
+// - path string
+func (_e *Client_Expecter) Read(path interface{}) *Client_Read_Call {
+ return &Client_Read_Call{Call: _e.mock.On("Read", path)}
+}
+
+func (_c *Client_Read_Call) Run(run func(path string)) *Client_Read_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ run(args[0].(string))
+ })
+ return _c
+}
+
+func (_c *Client_Read_Call) Return(_a0 *gcs.File, _a1 error) *Client_Read_Call {
+ _c.Call.Return(_a0, _a1)
+ return _c
+}
+
+func (_c *Client_Read_Call) RunAndReturn(run func(string) (*gcs.File, error)) *Client_Read_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewClient(t interface {