Documentation ¶
Overview ¶
Mocks for gitops-engine.
Package mock_engine is a generated GoMock package.
Package mock_engine is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitOpsEngineFactory ¶
type GitOpsEngineFactory interface {
New(engineOpts []engine.Option, cacheOpts []cache.UpdateSettingsFunc) engine.GitOpsEngine
}
GitOpsEngineFactory is a copy of agentk.GitOpsEngineFactory to break cyclic dependency.
type MockGitOpsEngine ¶
type MockGitOpsEngine struct {
// contains filtered or unexported fields
}
MockGitOpsEngine is a mock of GitOpsEngine interface
func NewMockGitOpsEngine ¶
func NewMockGitOpsEngine(ctrl *gomock.Controller) *MockGitOpsEngine
NewMockGitOpsEngine creates a new mock instance
func (*MockGitOpsEngine) EXPECT ¶
func (m *MockGitOpsEngine) EXPECT() *MockGitOpsEngineMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockGitOpsEngine) Run ¶
func (m *MockGitOpsEngine) Run() (engine.StopFunc, error)
Run mocks base method
func (*MockGitOpsEngine) Sync ¶
func (m *MockGitOpsEngine) Sync(arg0 context.Context, arg1 []*unstructured.Unstructured, arg2 func(*cache.Resource) bool, arg3, arg4 string, arg5 ...sync.SyncOpt) ([]common.ResourceSyncResult, error)
Sync mocks base method
type MockGitOpsEngineFactory ¶
type MockGitOpsEngineFactory struct {
// contains filtered or unexported fields
}
MockGitOpsEngineFactory is a mock of GitOpsEngineFactory interface
func NewMockGitOpsEngineFactory ¶
func NewMockGitOpsEngineFactory(ctrl *gomock.Controller) *MockGitOpsEngineFactory
NewMockGitOpsEngineFactory creates a new mock instance
func (*MockGitOpsEngineFactory) EXPECT ¶
func (m *MockGitOpsEngineFactory) EXPECT() *MockGitOpsEngineFactoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockGitOpsEngineFactory) New ¶
func (m *MockGitOpsEngineFactory) New(arg0 []engine.Option, arg1 []cache.UpdateSettingsFunc) engine.GitOpsEngine
New mocks base method
type MockGitOpsEngineFactoryMockRecorder ¶
type MockGitOpsEngineFactoryMockRecorder struct {
// contains filtered or unexported fields
}
MockGitOpsEngineFactoryMockRecorder is the mock recorder for MockGitOpsEngineFactory
func (*MockGitOpsEngineFactoryMockRecorder) New ¶
func (mr *MockGitOpsEngineFactoryMockRecorder) New(arg0, arg1 interface{}) *gomock.Call
New indicates an expected call of New
type MockGitOpsEngineMockRecorder ¶
type MockGitOpsEngineMockRecorder struct {
// contains filtered or unexported fields
}
MockGitOpsEngineMockRecorder is the mock recorder for MockGitOpsEngine
func (*MockGitOpsEngineMockRecorder) Run ¶
func (mr *MockGitOpsEngineMockRecorder) Run() *gomock.Call
Run indicates an expected call of Run
func (*MockGitOpsEngineMockRecorder) Sync ¶
func (mr *MockGitOpsEngineMockRecorder) Sync(arg0, arg1, arg2, arg3, arg4 interface{}, arg5 ...interface{}) *gomock.Call
Sync indicates an expected call of Sync
type ThreadSafeGitOpsEngine ¶
type ThreadSafeGitOpsEngine struct { // Mutex is a pointer to allow to share a mutex between mocks. // This is required because all mocks share a *gomock.Controller instance which is what we are protecting. Mutex *sync.Mutex Engine engine.GitOpsEngine }
func (*ThreadSafeGitOpsEngine) Run ¶
func (f *ThreadSafeGitOpsEngine) Run() (engine.StopFunc, error)
func (*ThreadSafeGitOpsEngine) Sync ¶
func (f *ThreadSafeGitOpsEngine) Sync(ctx context.Context, resources []*unstructured.Unstructured, isManaged func(r *cache.Resource) bool, revision string, namespace string, opts ...enginesync.SyncOpt) ([]common.ResourceSyncResult, error)
type ThreadSafeGitOpsEngineFactory ¶
type ThreadSafeGitOpsEngineFactory struct { EngineFactory GitOpsEngineFactory // contains filtered or unexported fields }
ThreadSafeGitOpsEngineFactory is a wrapper for GitOpsEngineFactory to make it thread safe. For use with tests - mocks, generated by GoMock, are not thread safe.
func (*ThreadSafeGitOpsEngineFactory) New ¶
func (f *ThreadSafeGitOpsEngineFactory) New(engineOpts []engine.Option, cacheOpts []cache.UpdateSettingsFunc) engine.GitOpsEngine