// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/domain" "bnema.dev/ermite/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewCISummaryStore creates a new instance of CISummaryStore. 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 NewCISummaryStore(t interface { mock.TestingT Cleanup(func()) }) *CISummaryStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &CISummaryStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // CISummaryStore is an autogenerated mock type for the CISummaryStore type type CISummaryStore struct { mock.Mock } type CISummaryStore_Expecter struct { mock *mock.Mock } func (_m *CISummaryStore) EXPECT() *CISummaryStore_Expecter { return &CISummaryStore_Expecter{mock: &_m.Mock} } // List provides a mock function for the type CISummaryStore func (_mock *CISummaryStore) List(ctx context.Context, ref ports.CILogRef, limit int, maxBytes int64) ([]domain.CIStepSummary, bool, error) { ret := _mock.Called(ctx, ref, limit, maxBytes) if len(ret) == 0 { panic("no return value specified for List") } var r0 []domain.CIStepSummary var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef, int, int64) ([]domain.CIStepSummary, bool, error)); ok { return returnFunc(ctx, ref, limit, maxBytes) } if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef, int, int64) []domain.CIStepSummary); ok { r0 = returnFunc(ctx, ref, limit, maxBytes) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.CIStepSummary) } } if returnFunc, ok := ret.Get(1).(func(context.Context, ports.CILogRef, int, int64) bool); ok { r1 = returnFunc(ctx, ref, limit, maxBytes) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context, ports.CILogRef, int, int64) error); ok { r2 = returnFunc(ctx, ref, limit, maxBytes) } else { r2 = ret.Error(2) } return r0, r1, r2 } // CISummaryStore_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' type CISummaryStore_List_Call struct { *mock.Call } // List is a helper method to define mock.On call // - ctx context.Context // - ref ports.CILogRef // - limit int // - maxBytes int64 func (_e *CISummaryStore_Expecter) List(ctx any, ref any, limit any, maxBytes any) *CISummaryStore_List_Call { return &CISummaryStore_List_Call{Call: _e.mock.On("List", ctx, ref, limit, maxBytes)} } func (_c *CISummaryStore_List_Call) Run(run func(ctx context.Context, ref ports.CILogRef, limit int, maxBytes int64)) *CISummaryStore_List_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.CILogRef if args[1] != nil { arg1 = args[1].(ports.CILogRef) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *CISummaryStore_List_Call) Return(summaries []domain.CIStepSummary, more bool, err error) *CISummaryStore_List_Call { _c.Call.Return(summaries, more, err) return _c } func (_c *CISummaryStore_List_Call) RunAndReturn(run func(ctx context.Context, ref ports.CILogRef, limit int, maxBytes int64) ([]domain.CIStepSummary, bool, error)) *CISummaryStore_List_Call { _c.Call.Return(run) return _c } // Put provides a mock function for the type CISummaryStore func (_mock *CISummaryStore) Put(ctx context.Context, ref ports.CILogRef, step int32, markdown string) error { ret := _mock.Called(ctx, ref, step, markdown) if len(ret) == 0 { panic("no return value specified for Put") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef, int32, string) error); ok { r0 = returnFunc(ctx, ref, step, markdown) } else { r0 = ret.Error(0) } return r0 } // CISummaryStore_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' type CISummaryStore_Put_Call struct { *mock.Call } // Put is a helper method to define mock.On call // - ctx context.Context // - ref ports.CILogRef // - step int32 // - markdown string func (_e *CISummaryStore_Expecter) Put(ctx any, ref any, step any, markdown any) *CISummaryStore_Put_Call { return &CISummaryStore_Put_Call{Call: _e.mock.On("Put", ctx, ref, step, markdown)} } func (_c *CISummaryStore_Put_Call) Run(run func(ctx context.Context, ref ports.CILogRef, step int32, markdown string)) *CISummaryStore_Put_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.CILogRef if args[1] != nil { arg1 = args[1].(ports.CILogRef) } var arg2 int32 if args[2] != nil { arg2 = args[2].(int32) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *CISummaryStore_Put_Call) Return(err error) *CISummaryStore_Put_Call { _c.Call.Return(err) return _c } func (_c *CISummaryStore_Put_Call) RunAndReturn(run func(ctx context.Context, ref ports.CILogRef, step int32, markdown string) error) *CISummaryStore_Put_Call { _c.Call.Return(run) return _c } // RemoveJob provides a mock function for the type CISummaryStore func (_mock *CISummaryStore) RemoveJob(ctx context.Context, ref ports.CILogRef) error { ret := _mock.Called(ctx, ref) if len(ret) == 0 { panic("no return value specified for RemoveJob") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef) error); ok { r0 = returnFunc(ctx, ref) } else { r0 = ret.Error(0) } return r0 } // CISummaryStore_RemoveJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveJob' type CISummaryStore_RemoveJob_Call struct { *mock.Call } // RemoveJob is a helper method to define mock.On call // - ctx context.Context // - ref ports.CILogRef func (_e *CISummaryStore_Expecter) RemoveJob(ctx any, ref any) *CISummaryStore_RemoveJob_Call { return &CISummaryStore_RemoveJob_Call{Call: _e.mock.On("RemoveJob", ctx, ref)} } func (_c *CISummaryStore_RemoveJob_Call) Run(run func(ctx context.Context, ref ports.CILogRef)) *CISummaryStore_RemoveJob_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.CILogRef if args[1] != nil { arg1 = args[1].(ports.CILogRef) } run( arg0, arg1, ) }) return _c } func (_c *CISummaryStore_RemoveJob_Call) Return(err error) *CISummaryStore_RemoveJob_Call { _c.Call.Return(err) return _c } func (_c *CISummaryStore_RemoveJob_Call) RunAndReturn(run func(ctx context.Context, ref ports.CILogRef) error) *CISummaryStore_RemoveJob_Call { _c.Call.Return(run) return _c } // RemoveRuns provides a mock function for the type CISummaryStore func (_mock *CISummaryStore) RemoveRuns(ctx context.Context, runIDs []int64) error { ret := _mock.Called(ctx, runIDs) if len(ret) == 0 { panic("no return value specified for RemoveRuns") } 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 } // CISummaryStore_RemoveRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRuns' type CISummaryStore_RemoveRuns_Call struct { *mock.Call } // RemoveRuns is a helper method to define mock.On call // - ctx context.Context // - runIDs []int64 func (_e *CISummaryStore_Expecter) RemoveRuns(ctx any, runIDs any) *CISummaryStore_RemoveRuns_Call { return &CISummaryStore_RemoveRuns_Call{Call: _e.mock.On("RemoveRuns", ctx, runIDs)} } func (_c *CISummaryStore_RemoveRuns_Call) Run(run func(ctx context.Context, runIDs []int64)) *CISummaryStore_RemoveRuns_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 *CISummaryStore_RemoveRuns_Call) Return(err error) *CISummaryStore_RemoveRuns_Call { _c.Call.Return(err) return _c } func (_c *CISummaryStore_RemoveRuns_Call) RunAndReturn(run func(ctx context.Context, runIDs []int64) error) *CISummaryStore_RemoveRuns_Call { _c.Call.Return(run) return _c } // RunIDs provides a mock function for the type CISummaryStore func (_mock *CISummaryStore) RunIDs(ctx context.Context) ([]int64, error) { ret := _mock.Called(ctx) 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) ([]int64, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []int64); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]int64) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // CISummaryStore_RunIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunIDs' type CISummaryStore_RunIDs_Call struct { *mock.Call } // RunIDs is a helper method to define mock.On call // - ctx context.Context func (_e *CISummaryStore_Expecter) RunIDs(ctx any) *CISummaryStore_RunIDs_Call { return &CISummaryStore_RunIDs_Call{Call: _e.mock.On("RunIDs", ctx)} } func (_c *CISummaryStore_RunIDs_Call) Run(run func(ctx context.Context)) *CISummaryStore_RunIDs_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *CISummaryStore_RunIDs_Call) Return(int64s []int64, err error) *CISummaryStore_RunIDs_Call { _c.Call.Return(int64s, err) return _c } func (_c *CISummaryStore_RunIDs_Call) RunAndReturn(run func(ctx context.Context) ([]int64, error)) *CISummaryStore_RunIDs_Call { _c.Call.Return(run) return _c }