// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewCIRunCleaner creates a new instance of CIRunCleaner. 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 NewCIRunCleaner(t interface { mock.TestingT Cleanup(func()) }) *CIRunCleaner { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &CIRunCleaner{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // CIRunCleaner is an autogenerated mock type for the CIRunCleaner type type CIRunCleaner struct { mock.Mock } type CIRunCleaner_Expecter struct { mock *mock.Mock } func (_m *CIRunCleaner) EXPECT() *CIRunCleaner_Expecter { return &CIRunCleaner_Expecter{mock: &_m.Mock} } // ForgetRepo provides a mock function for the type CIRunCleaner func (_mock *CIRunCleaner) ForgetRepo(repo domain.RepoName) { _mock.Called(repo) return } // CIRunCleaner_ForgetRepo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForgetRepo' type CIRunCleaner_ForgetRepo_Call struct { *mock.Call } // ForgetRepo is a helper method to define mock.On call // - repo domain.RepoName func (_e *CIRunCleaner_Expecter) ForgetRepo(repo any) *CIRunCleaner_ForgetRepo_Call { return &CIRunCleaner_ForgetRepo_Call{Call: _e.mock.On("ForgetRepo", repo)} } func (_c *CIRunCleaner_ForgetRepo_Call) Run(run func(repo domain.RepoName)) *CIRunCleaner_ForgetRepo_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 domain.RepoName if args[0] != nil { arg0 = args[0].(domain.RepoName) } run( arg0, ) }) return _c } func (_c *CIRunCleaner_ForgetRepo_Call) Return() *CIRunCleaner_ForgetRepo_Call { _c.Call.Return() return _c } func (_c *CIRunCleaner_ForgetRepo_Call) RunAndReturn(run func(repo domain.RepoName)) *CIRunCleaner_ForgetRepo_Call { _c.Run(run) return _c } // RemoveLogs provides a mock function for the type CIRunCleaner func (_mock *CIRunCleaner) RemoveLogs(ctx context.Context, runIDs []int64) error { ret := _mock.Called(ctx, runIDs) if len(ret) == 0 { panic("no return value specified for RemoveLogs") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, []int64) error); ok { r0 = returnFunc(ctx, runIDs) } else { r0 = ret.Error(0) } return r0 } // CIRunCleaner_RemoveLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveLogs' type CIRunCleaner_RemoveLogs_Call struct { *mock.Call } // RemoveLogs is a helper method to define mock.On call // - ctx context.Context // - runIDs []int64 func (_e *CIRunCleaner_Expecter) RemoveLogs(ctx any, runIDs any) *CIRunCleaner_RemoveLogs_Call { return &CIRunCleaner_RemoveLogs_Call{Call: _e.mock.On("RemoveLogs", ctx, runIDs)} } func (_c *CIRunCleaner_RemoveLogs_Call) Run(run func(ctx context.Context, runIDs []int64)) *CIRunCleaner_RemoveLogs_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 []int64 if args[1] != nil { arg1 = args[1].([]int64) } run( arg0, arg1, ) }) return _c } func (_c *CIRunCleaner_RemoveLogs_Call) Return(err error) *CIRunCleaner_RemoveLogs_Call { _c.Call.Return(err) return _c } func (_c *CIRunCleaner_RemoveLogs_Call) RunAndReturn(run func(ctx context.Context, runIDs []int64) error) *CIRunCleaner_RemoveLogs_Call { _c.Call.Return(run) return _c } // RunIDs provides a mock function for the type CIRunCleaner func (_mock *CIRunCleaner) RunIDs(ctx context.Context, repo domain.RepoName) ([]int64, error) { ret := _mock.Called(ctx, repo) if len(ret) == 0 { panic("no return value specified for RunIDs") } var r0 []int64 var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) ([]int64, error)); ok { return returnFunc(ctx, repo) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) []int64); ok { r0 = returnFunc(ctx, repo) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]int64) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName) error); ok { r1 = returnFunc(ctx, repo) } else { r1 = ret.Error(1) } return r0, r1 } // CIRunCleaner_RunIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunIDs' type CIRunCleaner_RunIDs_Call struct { *mock.Call } // RunIDs is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName func (_e *CIRunCleaner_Expecter) RunIDs(ctx any, repo any) *CIRunCleaner_RunIDs_Call { return &CIRunCleaner_RunIDs_Call{Call: _e.mock.On("RunIDs", ctx, repo)} } func (_c *CIRunCleaner_RunIDs_Call) Run(run func(ctx context.Context, repo domain.RepoName)) *CIRunCleaner_RunIDs_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.RepoName if args[1] != nil { arg1 = args[1].(domain.RepoName) } run( arg0, arg1, ) }) return _c } func (_c *CIRunCleaner_RunIDs_Call) Return(int64s []int64, err error) *CIRunCleaner_RunIDs_Call { _c.Call.Return(int64s, err) return _c } func (_c *CIRunCleaner_RunIDs_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName) ([]int64, error)) *CIRunCleaner_RunIDs_Call { _c.Call.Return(run) return _c }