mocks

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureClient

type AzureClient struct {
	mock.Mock
}

AzureClient is an autogenerated mock type for the AzureClient type

func NewAzureClient

func NewAzureClient(t mockConstructorTestingTNewAzureClient) *AzureClient

NewAzureClient creates a new instance of AzureClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*AzureClient) Create

func (_m *AzureClient) Create(ctx context.Context, path string, reader io.Reader, mimeType string) (string, error)

Create provides a mock function with given fields: ctx, path, reader, mimeType

func (*AzureClient) CreateUsingSASURL

func (_m *AzureClient) CreateUsingSASURL(ctx context.Context, sasURL string, reader io.Reader, mimeType string) (string, error)

CreateUsingSASURL provides a mock function with given fields: ctx, sasURL, reader, mimeType

func (*AzureClient) Exists

func (_m *AzureClient) Exists(ctx context.Context, path string) (bool, error)

Exists provides a mock function with given fields: ctx, path

func (*AzureClient) Find

func (_m *AzureClient) Find(ctx context.Context, path string) (io.ReadCloser, error)

Find provides a mock function with given fields: ctx, path

func (*AzureClient) FindUsingSASUrl

func (_m *AzureClient) FindUsingSASUrl(ctx context.Context, sasURL string) (io.ReadCloser, error)

FindUsingSASUrl provides a mock function with given fields: ctx, sasURL

func (*AzureClient) GetSASURL

func (_m *AzureClient) GetSASURL(ctx context.Context, purpose core.SASURLPurpose, query map[string]interface{}) (string, error)

GetSASURL provides a mock function with given fields: ctx, purpose, query

type BlockTestService

type BlockTestService struct {
	mock.Mock
}

BlockTestService is an autogenerated mock type for the BlockTestService type

func NewBlockTestService

func NewBlockTestService(t mockConstructorTestingTNewBlockTestService) *BlockTestService

NewBlockTestService creates a new instance of BlockTestService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*BlockTestService) GetBlockTests

func (_m *BlockTestService) GetBlockTests(ctx context.Context, blocklistYAML []string, branch string) error

GetBlockTests provides a mock function with given fields: ctx, blocklistYAML, branch

type Builder

type Builder struct {
	mock.Mock
}

Builder is an autogenerated mock type for the Builder type

func NewBuilder

func NewBuilder(t mockConstructorTestingTNewBuilder) *Builder

NewBuilder creates a new instance of Builder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Builder) GetDriver

func (_m *Builder) GetDriver(version int) (core.Driver, error)

GetDriver provides a mock function with given fields: version

type CacheStore

type CacheStore struct {
	mock.Mock
}

CacheStore is an autogenerated mock type for the CacheStore type

func NewCacheStore

func NewCacheStore(t mockConstructorTestingTNewCacheStore) *CacheStore

NewCacheStore creates a new instance of CacheStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*CacheStore) CacheWorkspace

func (_m *CacheStore) CacheWorkspace(ctx context.Context, subModule string) error

CacheWorkspace provides a mock function with given fields: ctx, subModule

func (*CacheStore) Download

func (_m *CacheStore) Download(ctx context.Context, cacheKey string) error

Download provides a mock function with given fields: ctx, cacheKey

func (*CacheStore) ExtractWorkspace

func (_m *CacheStore) ExtractWorkspace(ctx context.Context, subModule string) error

ExtractWorkspace provides a mock function with given fields: ctx, subModule

func (*CacheStore) Upload

func (_m *CacheStore) Upload(ctx context.Context, cacheKey string, itemsToCompress ...string) error

Upload provides a mock function with given fields: ctx, cacheKey, itemsToCompress

type CoverageService

type CoverageService struct {
	mock.Mock
}

CoverageService is an autogenerated mock type for the CoverageService type

func NewCoverageService

func NewCoverageService(t mockConstructorTestingTNewCoverageService) *CoverageService

NewCoverageService creates a new instance of CoverageService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*CoverageService) MergeAndUpload

func (_m *CoverageService) MergeAndUpload(ctx context.Context, payload *core.Payload) error

MergeAndUpload provides a mock function with given fields: ctx, payload

type DiffManager

type DiffManager struct {
	mock.Mock
}

DiffManager is an autogenerated mock type for the DiffManager type

func NewDiffManager

func NewDiffManager(t mockConstructorTestingTNewDiffManager) *DiffManager

NewDiffManager creates a new instance of DiffManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*DiffManager) GetChangedFiles

func (_m *DiffManager) GetChangedFiles(ctx context.Context, payload *core.Payload, oauth *core.Oauth) (map[string]int, error)

GetChangedFiles provides a mock function with given fields: ctx, payload, oauth

type DockerRunner

type DockerRunner struct {
	mock.Mock
}

DockerRunner is an autogenerated mock type for the DockerRunner type

func NewDockerRunner

func NewDockerRunner(t mockConstructorTestingTNewDockerRunner) *DockerRunner

NewDockerRunner creates a new instance of DockerRunner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*DockerRunner) Create

Create provides a mock function with given fields: _a0, _a1

func (*DockerRunner) Destroy

func (_m *DockerRunner) Destroy(ctx context.Context, r *core.RunnerOptions) error

Destroy provides a mock function with given fields: ctx, r

func (*DockerRunner) GetInfo

func (_m *DockerRunner) GetInfo(_a0 context.Context) (float32, int64)

GetInfo provides a mock function with given fields: _a0

func (*DockerRunner) Initiate

func (_m *DockerRunner) Initiate(_a0 context.Context, _a1 *core.RunnerOptions, _a2 chan core.ContainerStatus)

Initiate provides a mock function with given fields: _a0, _a1, _a2

func (*DockerRunner) KillRunningDocker

func (_m *DockerRunner) KillRunningDocker(ctx context.Context)

KillRunningDocker provides a mock function with given fields: ctx

func (*DockerRunner) PullImage

func (_m *DockerRunner) PullImage(containerImageConfig *core.ContainerImageConfig, r *core.RunnerOptions) error

PullImage provides a mock function with given fields: containerImageConfig, r

func (*DockerRunner) Run

Run provides a mock function with given fields: _a0, _a1

func (*DockerRunner) WaitForCompletion

func (_m *DockerRunner) WaitForCompletion(ctx context.Context, r *core.RunnerOptions) error

WaitForCompletion provides a mock function with given fields: ctx, r

type Driver

type Driver struct {
	mock.Mock
}

Driver is an autogenerated mock type for the Driver type

func NewDriver

func NewDriver(t mockConstructorTestingTNewDriver) *Driver

NewDriver creates a new instance of Driver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Driver) RunDiscovery

func (_m *Driver) RunDiscovery(ctx context.Context, payload *core.Payload, taskPayload *core.TaskPayload, oauth *core.Oauth, coverageDir string, secretMap map[string]string) error

RunDiscovery provides a mock function with given fields: ctx, payload, taskPayload, oauth, coverageDir, secretMap

func (*Driver) RunExecution

func (_m *Driver) RunExecution(ctx context.Context, payload *core.Payload, taskPayload *core.TaskPayload, oauth *core.Oauth, coverageDir string, secretMap map[string]string) error

RunExecution provides a mock function with given fields: ctx, payload, taskPayload, oauth, coverageDir, secretMap

type ExecutionManager

type ExecutionManager struct {
	mock.Mock
}

ExecutionManager is an autogenerated mock type for the ExecutionManager type

func NewExecutionManager

func NewExecutionManager(t mockConstructorTestingTNewExecutionManager) *ExecutionManager

NewExecutionManager creates a new instance of ExecutionManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ExecutionManager) ExecuteInternalCommands

func (_m *ExecutionManager) ExecuteInternalCommands(ctx context.Context, commandType core.CommandType, commands []string, cwd string, envMap map[string]string, secretData map[string]string) error

ExecuteInternalCommands provides a mock function with given fields: ctx, commandType, commands, cwd, envMap, secretData

func (*ExecutionManager) ExecuteUserCommands

func (_m *ExecutionManager) ExecuteUserCommands(ctx context.Context, commandType core.CommandType, payload *core.Payload, runConfig *core.Run, secretData map[string]string, logwriter core.LogWriterStrategy, cwd string) error

ExecuteUserCommands provides a mock function with given fields: ctx, commandType, payload, runConfig, secretData, logwriter, cwd

func (*ExecutionManager) GetEnvVariables

func (_m *ExecutionManager) GetEnvVariables(envMap map[string]string, secretData map[string]string) ([]string, error)

GetEnvVariables provides a mock function with given fields: envMap, secretData

type GitManager

type GitManager struct {
	mock.Mock
}

GitManager is an autogenerated mock type for the GitManager type

func NewGitManager

func NewGitManager(t mockConstructorTestingTNewGitManager) *GitManager

NewGitManager creates a new instance of GitManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*GitManager) Clone

func (_m *GitManager) Clone(ctx context.Context, payload *core.Payload, oauth *core.Oauth) error

Clone provides a mock function with given fields: ctx, payload, oauth

type ListSubModuleService

type ListSubModuleService struct {
	mock.Mock
}

ListSubModuleService is an autogenerated mock type for the ListSubModuleService type

func NewListSubModuleService

func NewListSubModuleService(t mockConstructorTestingTNewListSubModuleService) *ListSubModuleService

NewListSubModuleService creates a new instance of ListSubModuleService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ListSubModuleService) Send

func (_m *ListSubModuleService) Send(ctx context.Context, buildID string, totalSubmodule int) error

Send provides a mock function with given fields: ctx, buildID, totalSubmodule

type LogWriterStrategy

type LogWriterStrategy struct {
	mock.Mock
}

LogWriterStrategy is an autogenerated mock type for the LogWriterStrategy type

func NewLogWriterStrategy

func NewLogWriterStrategy(t mockConstructorTestingTNewLogWriterStrategy) *LogWriterStrategy

NewLogWriterStrategy creates a new instance of LogWriterStrategy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*LogWriterStrategy) Write

func (_m *LogWriterStrategy) Write(ctx context.Context, reader io.Reader) <-chan error

Write provides a mock function with given fields: ctx, reader

type Logger

type Logger struct {
	mock.Mock
}

Logger is an autogenerated mock type for the Logger type

func NewLogger

func NewLogger(t mockConstructorTestingTNewLogger) *Logger

NewLogger creates a new instance of Logger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Logger) Debugf

func (_m *Logger) Debugf(format string, args ...interface{})

Debugf provides a mock function with given fields: format, args

func (*Logger) Errorf

func (_m *Logger) Errorf(format string, args ...interface{})

Errorf provides a mock function with given fields: format, args

func (*Logger) Fatalf

func (_m *Logger) Fatalf(format string, args ...interface{})

Fatalf provides a mock function with given fields: format, args

func (*Logger) Infof

func (_m *Logger) Infof(format string, args ...interface{})

Infof provides a mock function with given fields: format, args

func (*Logger) Panicf

func (_m *Logger) Panicf(format string, args ...interface{})

Panicf provides a mock function with given fields: format, args

func (*Logger) Warnf

func (_m *Logger) Warnf(format string, args ...interface{})

Warnf provides a mock function with given fields: format, args

func (*Logger) WithFields

func (_m *Logger) WithFields(keyValues lumber.Fields) lumber.Logger

WithFields provides a mock function with given fields: keyValues

type PayloadManager

type PayloadManager struct {
	mock.Mock
}

PayloadManager is an autogenerated mock type for the PayloadManager type

func NewPayloadManager

func NewPayloadManager(t mockConstructorTestingTNewPayloadManager) *PayloadManager

NewPayloadManager creates a new instance of PayloadManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PayloadManager) FetchPayload

func (_m *PayloadManager) FetchPayload(ctx context.Context, payloadAddress string) (*core.Payload, error)

FetchPayload provides a mock function with given fields: ctx, payloadAddress

func (*PayloadManager) ValidatePayload

func (_m *PayloadManager) ValidatePayload(ctx context.Context, payload *core.Payload) error

ValidatePayload provides a mock function with given fields: ctx, payload

type Requests

type Requests struct {
	mock.Mock
}

Requests is an autogenerated mock type for the Requests type

func NewRequests

func NewRequests(t mockConstructorTestingTNewRequests) *Requests

NewRequests creates a new instance of Requests. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Requests) MakeAPIRequest

func (_m *Requests) MakeAPIRequest(ctx context.Context, httpMethod string, endpoint string, body []byte, params map[string]interface{}, headers map[string]string) ([]byte, int, error)

MakeAPIRequest provides a mock function with given fields: ctx, httpMethod, endpoint, body, params, headers

type SecretParser

type SecretParser struct {
	mock.Mock
}

SecretParser is an autogenerated mock type for the SecretParser type

func NewSecretParser

func NewSecretParser(t mockConstructorTestingTNewSecretParser) *SecretParser

NewSecretParser creates a new instance of SecretParser. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SecretParser) Expired

func (_m *SecretParser) Expired(token *core.Oauth) bool

Expired provides a mock function with given fields: token

func (*SecretParser) GetOauthSecret

func (_m *SecretParser) GetOauthSecret(filepath string) (*core.Oauth, error)

GetOauthSecret provides a mock function with given fields: filepath

func (*SecretParser) GetRepoSecret

func (_m *SecretParser) GetRepoSecret(_a0 string) (map[string]string, error)

GetRepoSecret provides a mock function with given fields: _a0

func (*SecretParser) SubstituteSecret

func (_m *SecretParser) SubstituteSecret(command string, secretData map[string]string) (string, error)

SubstituteSecret provides a mock function with given fields: command, secretData

type SecretsManager

type SecretsManager struct {
	mock.Mock
}

SecretsManager is an autogenerated mock type for the SecretsManager type

func NewSecretsManager

func NewSecretsManager(t mockConstructorTestingTNewSecretsManager) *SecretsManager

NewSecretsManager creates a new instance of SecretsManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SecretsManager) GetDockerSecrets

func (_m *SecretsManager) GetDockerSecrets(r *core.RunnerOptions) (core.ContainerImageConfig, error)

GetDockerSecrets provides a mock function with given fields: r

func (*SecretsManager) GetLambdatestSecrets

func (_m *SecretsManager) GetLambdatestSecrets() *config.LambdatestConfig

GetLambdatestSecrets provides a mock function with given fields:

func (*SecretsManager) GetSynapseName

func (_m *SecretsManager) GetSynapseName() string

GetSynapseName provides a mock function with given fields:

func (*SecretsManager) WriteGitSecrets

func (_m *SecretsManager) WriteGitSecrets(path string) error

WriteGitSecrets provides a mock function with given fields: path

func (*SecretsManager) WriteRepoSecrets

func (_m *SecretsManager) WriteRepoSecrets(repo string, path string) error

WriteRepoSecrets provides a mock function with given fields: repo, path

type SynapseManager

type SynapseManager struct {
	mock.Mock
}

SynapseManager is an autogenerated mock type for the SynapseManager type

func NewSynapseManager

func NewSynapseManager(t mockConstructorTestingTNewSynapseManager) *SynapseManager

NewSynapseManager creates a new instance of SynapseManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SynapseManager) InitiateConnection

func (_m *SynapseManager) InitiateConnection(ctx context.Context, wg *sync.WaitGroup, connectionFailed chan struct{})

InitiateConnection provides a mock function with given fields: ctx, wg, connectionFailed

type TASConfigManager

type TASConfigManager struct {
	mock.Mock
}

TASConfigManager is an autogenerated mock type for the TASConfigManager type

func NewTASConfigManager

func NewTASConfigManager(t mockConstructorTestingTNewTASConfigManager) *TASConfigManager

NewTASConfigManager creates a new instance of TASConfigManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TASConfigManager) GetVersion

func (_m *TASConfigManager) GetVersion(path string) (int, error)

GetVersion provides a mock function with given fields: path

func (*TASConfigManager) LoadAndValidate

func (_m *TASConfigManager) LoadAndValidate(ctx context.Context, version int, path string, eventType core.EventType, licenseTier core.Tier) (interface{}, error)

LoadAndValidate provides a mock function with given fields: ctx, version, path, eventType, licenseTier

type Task

type Task struct {
	mock.Mock
}

Task is an autogenerated mock type for the Task type

func NewTask

func NewTask(t mockConstructorTestingTNewTask) *Task

NewTask creates a new instance of Task. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Task) UpdateStatus

func (_m *Task) UpdateStatus(ctx context.Context, payload *core.TaskPayload) error

UpdateStatus provides a mock function with given fields: ctx, payload

type TestDiscoveryService

type TestDiscoveryService struct {
	mock.Mock
}

TestDiscoveryService is an autogenerated mock type for the TestDiscoveryService type

func NewTestDiscoveryService

func NewTestDiscoveryService(t mockConstructorTestingTNewTestDiscoveryService) *TestDiscoveryService

NewTestDiscoveryService creates a new instance of TestDiscoveryService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TestDiscoveryService) Discover

Discover provides a mock function with given fields: ctx, args

func (*TestDiscoveryService) SendResult

func (_m *TestDiscoveryService) SendResult(ctx context.Context, testDiscoveryResult *core.DiscoveryResult) error

SendResult provides a mock function with given fields: ctx, testDiscoveryResult

type TestExecutionService

type TestExecutionService struct {
	mock.Mock
}

TestExecutionService is an autogenerated mock type for the TestExecutionService type

func NewTestExecutionService

func NewTestExecutionService(t mockConstructorTestingTNewTestExecutionService) *TestExecutionService

NewTestExecutionService creates a new instance of TestExecutionService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TestExecutionService) Run

Run provides a mock function with given fields: ctx, testExecutionArgs

func (*TestExecutionService) SendResults

SendResults provides a mock function with given fields: ctx, payload

type TestStats

type TestStats struct {
	mock.Mock
}

TestStats is an autogenerated mock type for the TestStats type

func NewTestStats

func NewTestStats(t mockConstructorTestingTNewTestStats) *TestStats

NewTestStats creates a new instance of TestStats. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TestStats) CaptureTestStats

func (_m *TestStats) CaptureTestStats(pid int32, collectStats bool) error

CaptureTestStats provides a mock function with given fields: pid, collectStats

type ZstdCompressor

type ZstdCompressor struct {
	mock.Mock
}

ZstdCompressor is an autogenerated mock type for the ZstdCompressor type

func NewZstdCompressor

func NewZstdCompressor(t mockConstructorTestingTNewZstdCompressor) *ZstdCompressor

NewZstdCompressor creates a new instance of ZstdCompressor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ZstdCompressor) Compress

func (_m *ZstdCompressor) Compress(ctx context.Context, compressedFileName string, preservePath bool, workingDirectory string, filesToCompress ...string) error

Compress provides a mock function with given fields: ctx, compressedFileName, preservePath, workingDirectory, filesToCompress

func (*ZstdCompressor) Decompress

func (_m *ZstdCompressor) Decompress(ctx context.Context, filePath string, preservePath bool, workingDirectory string) error

Decompress provides a mock function with given fields: ctx, filePath, preservePath, workingDirectory

Jump to

Keyboard shortcuts

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