// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" mock "github.com/stretchr/testify/mock" ) // NewMockpushImageOps creates a new instance of MockpushImageOps. 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 NewMockpushImageOps(t interface { mock.TestingT Cleanup(func()) }) *MockpushImageOps { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockpushImageOps{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockpushImageOps is an autogenerated mock type for the pushImageOps type type MockpushImageOps struct { mock.Mock } type MockpushImageOps_Expecter struct { mock *mock.Mock } func (_m *MockpushImageOps) EXPECT() *MockpushImageOps_Expecter { return &MockpushImageOps_Expecter{mock: &_m.Mock} } // Build provides a mock function for the type MockpushImageOps func (_mock *MockpushImageOps) Build(ctx context.Context, args []string) error { ret := _mock.Called(ctx, args) if len(ret) == 0 { panic("no return value specified for Build") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, []string) error); ok { r0 = returnFunc(ctx, args) } else { r0 = ret.Error(0) } return r0 } // MockpushImageOps_Build_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Build' type MockpushImageOps_Build_Call struct { *mock.Call } // Build is a helper method to define mock.On call // - ctx context.Context // - args []string func (_e *MockpushImageOps_Expecter) Build(ctx any, args any) *MockpushImageOps_Build_Call { return &MockpushImageOps_Build_Call{Call: _e.mock.On("Build", ctx, args)} } func (_c *MockpushImageOps_Build_Call) Run(run func(ctx context.Context, args []string)) *MockpushImageOps_Build_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 []string if args[1] != nil { arg1 = args[1].([]string) } run( arg0, arg1, ) }) return _c } func (_c *MockpushImageOps_Build_Call) Return(err error) *MockpushImageOps_Build_Call { _c.Call.Return(err) return _c } func (_c *MockpushImageOps_Build_Call) RunAndReturn(run func(ctx context.Context, args []string) error) *MockpushImageOps_Build_Call { _c.Call.Return(run) return _c } // Exists provides a mock function for the type MockpushImageOps func (_mock *MockpushImageOps) Exists(ctx context.Context, imageRef string) (bool, error) { ret := _mock.Called(ctx, imageRef) if len(ret) == 0 { panic("no return value specified for Exists") } var r0 bool var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { return returnFunc(ctx, imageRef) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { r0 = returnFunc(ctx, imageRef) } else { r0 = ret.Get(0).(bool) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, imageRef) } else { r1 = ret.Error(1) } return r0, r1 } // MockpushImageOps_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists' type MockpushImageOps_Exists_Call struct { *mock.Call } // Exists is a helper method to define mock.On call // - ctx context.Context // - imageRef string func (_e *MockpushImageOps_Expecter) Exists(ctx any, imageRef any) *MockpushImageOps_Exists_Call { return &MockpushImageOps_Exists_Call{Call: _e.mock.On("Exists", ctx, imageRef)} } func (_c *MockpushImageOps_Exists_Call) Run(run func(ctx context.Context, imageRef string)) *MockpushImageOps_Exists_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockpushImageOps_Exists_Call) Return(b bool, err error) *MockpushImageOps_Exists_Call { _c.Call.Return(b, err) return _c } func (_c *MockpushImageOps_Exists_Call) RunAndReturn(run func(ctx context.Context, imageRef string) (bool, error)) *MockpushImageOps_Exists_Call { _c.Call.Return(run) return _c } // Push provides a mock function for the type MockpushImageOps func (_mock *MockpushImageOps) Push(ctx context.Context, ref string) error { ret := _mock.Called(ctx, ref) if len(ret) == 0 { panic("no return value specified for Push") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = returnFunc(ctx, ref) } else { r0 = ret.Error(0) } return r0 } // MockpushImageOps_Push_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Push' type MockpushImageOps_Push_Call struct { *mock.Call } // Push is a helper method to define mock.On call // - ctx context.Context // - ref string func (_e *MockpushImageOps_Expecter) Push(ctx any, ref any) *MockpushImageOps_Push_Call { return &MockpushImageOps_Push_Call{Call: _e.mock.On("Push", ctx, ref)} } func (_c *MockpushImageOps_Push_Call) Run(run func(ctx context.Context, ref string)) *MockpushImageOps_Push_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockpushImageOps_Push_Call) Return(err error) *MockpushImageOps_Push_Call { _c.Call.Return(err) return _c } func (_c *MockpushImageOps_Push_Call) RunAndReturn(run func(ctx context.Context, ref string) error) *MockpushImageOps_Push_Call { _c.Call.Return(run) return _c } // Tag provides a mock function for the type MockpushImageOps func (_mock *MockpushImageOps) Tag(ctx context.Context, sourceRef string, targetRef string) error { ret := _mock.Called(ctx, sourceRef, targetRef) if len(ret) == 0 { panic("no return value specified for Tag") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = returnFunc(ctx, sourceRef, targetRef) } else { r0 = ret.Error(0) } return r0 } // MockpushImageOps_Tag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tag' type MockpushImageOps_Tag_Call struct { *mock.Call } // Tag is a helper method to define mock.On call // - ctx context.Context // - sourceRef string // - targetRef string func (_e *MockpushImageOps_Expecter) Tag(ctx any, sourceRef any, targetRef any) *MockpushImageOps_Tag_Call { return &MockpushImageOps_Tag_Call{Call: _e.mock.On("Tag", ctx, sourceRef, targetRef)} } func (_c *MockpushImageOps_Tag_Call) Run(run func(ctx context.Context, sourceRef string, targetRef string)) *MockpushImageOps_Tag_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockpushImageOps_Tag_Call) Return(err error) *MockpushImageOps_Tag_Call { _c.Call.Return(err) return _c } func (_c *MockpushImageOps_Tag_Call) RunAndReturn(run func(ctx context.Context, sourceRef string, targetRef string) error) *MockpushImageOps_Tag_Call { _c.Call.Return(run) return _c }