mock_engine

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 9 Imported by: 0

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

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

EXPECT returns an object that allows the caller to indicate expected use

func (*MockGitOpsEngineFactory) New

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

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 (*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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL