// 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" ) // NewCIArtifactStore creates a new instance of CIArtifactStore. 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 NewCIArtifactStore(t interface { mock.TestingT Cleanup(func()) }) *CIArtifactStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &CIArtifactStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // CIArtifactStore is an autogenerated mock type for the CIArtifactStore type type CIArtifactStore struct { mock.Mock } type CIArtifactStore_Expecter struct { mock *mock.Mock } func (_m *CIArtifactStore) EXPECT() *CIArtifactStore_Expecter { return &CIArtifactStore_Expecter{mock: &_m.Mock} } // AllArtifacts provides a mock function for the type CIArtifactStore func (_mock *CIArtifactStore) AllArtifacts(ctx context.Context) ([]domain.CIArtifact, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for AllArtifacts") } var r0 []domain.CIArtifact var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.CIArtifact, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.CIArtifact); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.CIArtifact) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // CIArtifactStore_AllArtifacts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllArtifacts' type CIArtifactStore_AllArtifacts_Call struct { *mock.Call } // AllArtifacts is a helper method to define mock.On call // - ctx context.Context func (_e *CIArtifactStore_Expecter) AllArtifacts(ctx any) *CIArtifactStore_AllArtifacts_Call { return &CIArtifactStore_AllArtifacts_Call{Call: _e.mock.On("AllArtifacts", ctx)} } func (_c *CIArtifactStore_AllArtifacts_Call) Run(run func(ctx context.Context)) *CIArtifactStore_AllArtifacts_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 *CIArtifactStore_AllArtifacts_Call) Return(cIArtifacts []domain.CIArtifact, err error) *CIArtifactStore_AllArtifacts_Call { _c.Call.Return(cIArtifacts, err) return _c } func (_c *CIArtifactStore_AllArtifacts_Call) RunAndReturn(run func(ctx context.Context) ([]domain.CIArtifact, error)) *CIArtifactStore_AllArtifacts_Call { _c.Call.Return(run) return _c } // ApplyArtifacts provides a mock function for the type CIArtifactStore func (_mock *CIArtifactStore) ApplyArtifacts(ctx context.Context, w ports.CIArtifactWrite) error { ret := _mock.Called(ctx, w) if len(ret) == 0 { panic("no return value specified for ApplyArtifacts") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CIArtifactWrite) error); ok { r0 = returnFunc(ctx, w) } else { r0 = ret.Error(0) } return r0 } // CIArtifactStore_ApplyArtifacts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyArtifacts' type CIArtifactStore_ApplyArtifacts_Call struct { *mock.Call } // ApplyArtifacts is a helper method to define mock.On call // - ctx context.Context // - w ports.CIArtifactWrite func (_e *CIArtifactStore_Expecter) ApplyArtifacts(ctx any, w any) *CIArtifactStore_ApplyArtifacts_Call { return &CIArtifactStore_ApplyArtifacts_Call{Call: _e.mock.On("ApplyArtifacts", ctx, w)} } func (_c *CIArtifactStore_ApplyArtifacts_Call) Run(run func(ctx context.Context, w ports.CIArtifactWrite)) *CIArtifactStore_ApplyArtifacts_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.CIArtifactWrite if args[1] != nil { arg1 = args[1].(ports.CIArtifactWrite) } run( arg0, arg1, ) }) return _c } func (_c *CIArtifactStore_ApplyArtifacts_Call) Return(err error) *CIArtifactStore_ApplyArtifacts_Call { _c.Call.Return(err) return _c } func (_c *CIArtifactStore_ApplyArtifacts_Call) RunAndReturn(run func(ctx context.Context, w ports.CIArtifactWrite) error) *CIArtifactStore_ApplyArtifacts_Call { _c.Call.Return(run) return _c } // ArtifactBlocks provides a mock function for the type CIArtifactStore func (_mock *CIArtifactStore) ArtifactBlocks(ctx context.Context, id int64) ([]ports.CIArtifactBlock, error) { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for ArtifactBlocks") } var r0 []ports.CIArtifactBlock var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int64) ([]ports.CIArtifactBlock, error)); ok { return returnFunc(ctx, id) } if returnFunc, ok := ret.Get(0).(func(context.Context, int64) []ports.CIArtifactBlock); ok { r0 = returnFunc(ctx, id) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]ports.CIArtifactBlock) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = returnFunc(ctx, id) } else { r1 = ret.Error(1) } return r0, r1 } // CIArtifactStore_ArtifactBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ArtifactBlocks' type CIArtifactStore_ArtifactBlocks_Call struct { *mock.Call } // ArtifactBlocks is a helper method to define mock.On call // - ctx context.Context // - id int64 func (_e *CIArtifactStore_Expecter) ArtifactBlocks(ctx any, id any) *CIArtifactStore_ArtifactBlocks_Call { return &CIArtifactStore_ArtifactBlocks_Call{Call: _e.mock.On("ArtifactBlocks", ctx, id)} } func (_c *CIArtifactStore_ArtifactBlocks_Call) Run(run func(ctx context.Context, id int64)) *CIArtifactStore_ArtifactBlocks_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 *CIArtifactStore_ArtifactBlocks_Call) Return(cIArtifactBlocks []ports.CIArtifactBlock, err error) *CIArtifactStore_ArtifactBlocks_Call { _c.Call.Return(cIArtifactBlocks, err) return _c } func (_c *CIArtifactStore_ArtifactBlocks_Call) RunAndReturn(run func(ctx context.Context, id int64) ([]ports.CIArtifactBlock, error)) *CIArtifactStore_ArtifactBlocks_Call { _c.Call.Return(run) return _c } // ArtifactUsage provides a mock function for the type CIArtifactStore func (_mock *CIArtifactStore) ArtifactUsage(ctx context.Context, repo domain.RepoName) (int64, uint64, error) { ret := _mock.Called(ctx, repo) if len(ret) == 0 { panic("no return value specified for ArtifactUsage") } var r0 int64 var r1 uint64 var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) (int64, uint64, error)); ok { return returnFunc(ctx, repo) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) int64); ok { r0 = returnFunc(ctx, repo) } else { r0 = ret.Get(0).(int64) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName) uint64); ok { r1 = returnFunc(ctx, repo) } else { r1 = ret.Get(1).(uint64) } if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName) error); ok { r2 = returnFunc(ctx, repo) } else { r2 = ret.Error(2) } return r0, r1, r2 } // CIArtifactStore_ArtifactUsage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ArtifactUsage' type CIArtifactStore_ArtifactUsage_Call struct { *mock.Call } // ArtifactUsage is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName func (_e *CIArtifactStore_Expecter) ArtifactUsage(ctx any, repo any) *CIArtifactStore_ArtifactUsage_Call { return &CIArtifactStore_ArtifactUsage_Call{Call: _e.mock.On("ArtifactUsage", ctx, repo)} } func (_c *CIArtifactStore_ArtifactUsage_Call) Run(run func(ctx context.Context, repo domain.RepoName)) *CIArtifactStore_ArtifactUsage_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 *CIArtifactStore_ArtifactUsage_Call) Return(used int64, version uint64, err error) *CIArtifactStore_ArtifactUsage_Call { _c.Call.Return(used, version, err) return _c } func (_c *CIArtifactStore_ArtifactUsage_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName) (int64, uint64, error)) *CIArtifactStore_ArtifactUsage_Call { _c.Call.Return(run) return _c } // BlockArtifactIDs provides a mock function for the type CIArtifactStore func (_mock *CIArtifactStore) BlockArtifactIDs(ctx context.Context) ([]int64, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for BlockArtifactIDs") } 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 } // CIArtifactStore_BlockArtifactIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockArtifactIDs' type CIArtifactStore_BlockArtifactIDs_Call struct { *mock.Call } // BlockArtifactIDs is a helper method to define mock.On call // - ctx context.Context func (_e *CIArtifactStore_Expecter) BlockArtifactIDs(ctx any) *CIArtifactStore_BlockArtifactIDs_Call { return &CIArtifactStore_BlockArtifactIDs_Call{Call: _e.mock.On("BlockArtifactIDs", ctx)} } func (_c *CIArtifactStore_BlockArtifactIDs_Call) Run(run func(ctx context.Context)) *CIArtifactStore_BlockArtifactIDs_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 *CIArtifactStore_BlockArtifactIDs_Call) Return(int64s []int64, err error) *CIArtifactStore_BlockArtifactIDs_Call { _c.Call.Return(int64s, err) return _c } func (_c *CIArtifactStore_BlockArtifactIDs_Call) RunAndReturn(run func(ctx context.Context) ([]int64, error)) *CIArtifactStore_BlockArtifactIDs_Call { _c.Call.Return(run) return _c } // DeleteBlocks provides a mock function for the type CIArtifactStore func (_mock *CIArtifactStore) DeleteBlocks(ctx context.Context, id int64) error { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for DeleteBlocks") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Error(0) } return r0 } // CIArtifactStore_DeleteBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBlocks' type CIArtifactStore_DeleteBlocks_Call struct { *mock.Call } // DeleteBlocks is a helper method to define mock.On call // - ctx context.Context // - id int64 func (_e *CIArtifactStore_Expecter) DeleteBlocks(ctx any, id any) *CIArtifactStore_DeleteBlocks_Call { return &CIArtifactStore_DeleteBlocks_Call{Call: _e.mock.On("DeleteBlocks", ctx, id)} } func (_c *CIArtifactStore_DeleteBlocks_Call) Run(run func(ctx context.Context, id int64)) *CIArtifactStore_DeleteBlocks_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 *CIArtifactStore_DeleteBlocks_Call) Return(err error) *CIArtifactStore_DeleteBlocks_Call { _c.Call.Return(err) return _c } func (_c *CIArtifactStore_DeleteBlocks_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *CIArtifactStore_DeleteBlocks_Call { _c.Call.Return(run) return _c } // GetArtifact provides a mock function for the type CIArtifactStore func (_mock *CIArtifactStore) GetArtifact(ctx context.Context, id int64) (domain.CIArtifact, error) { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for GetArtifact") } var r0 domain.CIArtifact var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int64) (domain.CIArtifact, error)); ok { return returnFunc(ctx, id) } if returnFunc, ok := ret.Get(0).(func(context.Context, int64) domain.CIArtifact); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Get(0).(domain.CIArtifact) } if returnFunc, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = returnFunc(ctx, id) } else { r1 = ret.Error(1) } return r0, r1 } // CIArtifactStore_GetArtifact_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetArtifact' type CIArtifactStore_GetArtifact_Call struct { *mock.Call } // GetArtifact is a helper method to define mock.On call // - ctx context.Context // - id int64 func (_e *CIArtifactStore_Expecter) GetArtifact(ctx any, id any) *CIArtifactStore_GetArtifact_Call { return &CIArtifactStore_GetArtifact_Call{Call: _e.mock.On("GetArtifact", ctx, id)} } func (_c *CIArtifactStore_GetArtifact_Call) Run(run func(ctx context.Context, id int64)) *CIArtifactStore_GetArtifact_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 *CIArtifactStore_GetArtifact_Call) Return(cIArtifact domain.CIArtifact, err error) *CIArtifactStore_GetArtifact_Call { _c.Call.Return(cIArtifact, err) return _c } func (_c *CIArtifactStore_GetArtifact_Call) RunAndReturn(run func(ctx context.Context, id int64) (domain.CIArtifact, error)) *CIArtifactStore_GetArtifact_Call { _c.Call.Return(run) return _c } // NextArtifactID provides a mock function for the type CIArtifactStore func (_mock *CIArtifactStore) NextArtifactID(ctx context.Context) (int64, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for NextArtifactID") } 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 { 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 } // CIArtifactStore_NextArtifactID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NextArtifactID' type CIArtifactStore_NextArtifactID_Call struct { *mock.Call } // NextArtifactID is a helper method to define mock.On call // - ctx context.Context func (_e *CIArtifactStore_Expecter) NextArtifactID(ctx any) *CIArtifactStore_NextArtifactID_Call { return &CIArtifactStore_NextArtifactID_Call{Call: _e.mock.On("NextArtifactID", ctx)} } func (_c *CIArtifactStore_NextArtifactID_Call) Run(run func(ctx context.Context)) *CIArtifactStore_NextArtifactID_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 *CIArtifactStore_NextArtifactID_Call) Return(n int64, err error) *CIArtifactStore_NextArtifactID_Call { _c.Call.Return(n, err) return _c } func (_c *CIArtifactStore_NextArtifactID_Call) RunAndReturn(run func(ctx context.Context) (int64, error)) *CIArtifactStore_NextArtifactID_Call { _c.Call.Return(run) return _c } // RunArtifacts provides a mock function for the type CIArtifactStore func (_mock *CIArtifactStore) RunArtifacts(ctx context.Context, repo domain.RepoName, runID int64) ([]domain.CIArtifact, error) { ret := _mock.Called(ctx, repo, runID) if len(ret) == 0 { panic("no return value specified for RunArtifacts") } var r0 []domain.CIArtifact var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, int64) ([]domain.CIArtifact, error)); ok { return returnFunc(ctx, repo, runID) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, int64) []domain.CIArtifact); ok { r0 = returnFunc(ctx, repo, runID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.CIArtifact) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, int64) error); ok { r1 = returnFunc(ctx, repo, runID) } else { r1 = ret.Error(1) } return r0, r1 } // CIArtifactStore_RunArtifacts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunArtifacts' type CIArtifactStore_RunArtifacts_Call struct { *mock.Call } // RunArtifacts is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - runID int64 func (_e *CIArtifactStore_Expecter) RunArtifacts(ctx any, repo any, runID any) *CIArtifactStore_RunArtifacts_Call { return &CIArtifactStore_RunArtifacts_Call{Call: _e.mock.On("RunArtifacts", ctx, repo, runID)} } func (_c *CIArtifactStore_RunArtifacts_Call) Run(run func(ctx context.Context, repo domain.RepoName, runID int64)) *CIArtifactStore_RunArtifacts_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) } var arg2 int64 if args[2] != nil { arg2 = args[2].(int64) } run( arg0, arg1, arg2, ) }) return _c } func (_c *CIArtifactStore_RunArtifacts_Call) Return(cIArtifacts []domain.CIArtifact, err error) *CIArtifactStore_RunArtifacts_Call { _c.Call.Return(cIArtifacts, err) return _c } func (_c *CIArtifactStore_RunArtifacts_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, runID int64) ([]domain.CIArtifact, error)) *CIArtifactStore_RunArtifacts_Call { _c.Call.Return(run) return _c }