executors/docker/internal/volumes/mock_Manager.go (157 lines of code) (raw):
// Code generated by mockery v2.53.3. DO NOT EDIT.
package volumes
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// MockManager is an autogenerated mock type for the Manager type
type MockManager struct {
mock.Mock
}
type MockManager_Expecter struct {
mock *mock.Mock
}
func (_m *MockManager) EXPECT() *MockManager_Expecter {
return &MockManager_Expecter{mock: &_m.Mock}
}
// Binds provides a mock function with no fields
func (_m *MockManager) Binds() []string {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Binds")
}
var r0 []string
if rf, ok := ret.Get(0).(func() []string); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
return r0
}
// MockManager_Binds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Binds'
type MockManager_Binds_Call struct {
*mock.Call
}
// Binds is a helper method to define mock.On call
func (_e *MockManager_Expecter) Binds() *MockManager_Binds_Call {
return &MockManager_Binds_Call{Call: _e.mock.On("Binds")}
}
func (_c *MockManager_Binds_Call) Run(run func()) *MockManager_Binds_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockManager_Binds_Call) Return(_a0 []string) *MockManager_Binds_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockManager_Binds_Call) RunAndReturn(run func() []string) *MockManager_Binds_Call {
_c.Call.Return(run)
return _c
}
// Create provides a mock function with given fields: ctx, volume
func (_m *MockManager) Create(ctx context.Context, volume string) error {
ret := _m.Called(ctx, volume)
if len(ret) == 0 {
panic("no return value specified for Create")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, volume)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockManager_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
type MockManager_Create_Call struct {
*mock.Call
}
// Create is a helper method to define mock.On call
// - ctx context.Context
// - volume string
func (_e *MockManager_Expecter) Create(ctx interface{}, volume interface{}) *MockManager_Create_Call {
return &MockManager_Create_Call{Call: _e.mock.On("Create", ctx, volume)}
}
func (_c *MockManager_Create_Call) Run(run func(ctx context.Context, volume string)) *MockManager_Create_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockManager_Create_Call) Return(_a0 error) *MockManager_Create_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockManager_Create_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_Create_Call {
_c.Call.Return(run)
return _c
}
// CreateTemporary provides a mock function with given fields: ctx, destination
func (_m *MockManager) CreateTemporary(ctx context.Context, destination string) error {
ret := _m.Called(ctx, destination)
if len(ret) == 0 {
panic("no return value specified for CreateTemporary")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, destination)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockManager_CreateTemporary_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTemporary'
type MockManager_CreateTemporary_Call struct {
*mock.Call
}
// CreateTemporary is a helper method to define mock.On call
// - ctx context.Context
// - destination string
func (_e *MockManager_Expecter) CreateTemporary(ctx interface{}, destination interface{}) *MockManager_CreateTemporary_Call {
return &MockManager_CreateTemporary_Call{Call: _e.mock.On("CreateTemporary", ctx, destination)}
}
func (_c *MockManager_CreateTemporary_Call) Run(run func(ctx context.Context, destination string)) *MockManager_CreateTemporary_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockManager_CreateTemporary_Call) Return(_a0 error) *MockManager_CreateTemporary_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockManager_CreateTemporary_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_CreateTemporary_Call {
_c.Call.Return(run)
return _c
}
// RemoveTemporary provides a mock function with given fields: ctx
func (_m *MockManager) RemoveTemporary(ctx context.Context) error {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for RemoveTemporary")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(ctx)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockManager_RemoveTemporary_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveTemporary'
type MockManager_RemoveTemporary_Call struct {
*mock.Call
}
// RemoveTemporary is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockManager_Expecter) RemoveTemporary(ctx interface{}) *MockManager_RemoveTemporary_Call {
return &MockManager_RemoveTemporary_Call{Call: _e.mock.On("RemoveTemporary", ctx)}
}
func (_c *MockManager_RemoveTemporary_Call) Run(run func(ctx context.Context)) *MockManager_RemoveTemporary_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockManager_RemoveTemporary_Call) Return(_a0 error) *MockManager_RemoveTemporary_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockManager_RemoveTemporary_Call) RunAndReturn(run func(context.Context) error) *MockManager_RemoveTemporary_Call {
_c.Call.Return(run)
return _c
}
// NewMockManager creates a new instance of MockManager. 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 NewMockManager(t interface {
mock.TestingT
Cleanup(func())
}) *MockManager {
mock := &MockManager{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}