mocks

package
v1.15.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchServiceClient

type BatchServiceClient struct {
	mock.Mock
}

BatchServiceClient is an autogenerated mock type for the BatchServiceClient type

func NewBatchServiceClient added in v1.15.1

func NewBatchServiceClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *BatchServiceClient

NewBatchServiceClient creates a new instance of BatchServiceClient. 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 (*BatchServiceClient) DescribeJobsWithContext

func (_m *BatchServiceClient) DescribeJobsWithContext(ctx context.Context, input *batch.DescribeJobsInput, opts ...request.Option) (*batch.DescribeJobsOutput, error)

DescribeJobsWithContext provides a mock function with given fields: ctx, input, opts

func (*BatchServiceClient) EXPECT added in v1.15.1

func (*BatchServiceClient) RegisterJobDefinitionWithContext

func (_m *BatchServiceClient) RegisterJobDefinitionWithContext(ctx context.Context, input *batch.RegisterJobDefinitionInput, opts ...request.Option) (*batch.RegisterJobDefinitionOutput, error)

RegisterJobDefinitionWithContext provides a mock function with given fields: ctx, input, opts

func (*BatchServiceClient) SubmitJobWithContext

func (_m *BatchServiceClient) SubmitJobWithContext(ctx context.Context, input *batch.SubmitJobInput, opts ...request.Option) (*batch.SubmitJobOutput, error)

SubmitJobWithContext provides a mock function with given fields: ctx, input, opts

func (*BatchServiceClient) TerminateJobWithContext

func (_m *BatchServiceClient) TerminateJobWithContext(ctx context.Context, input *batch.TerminateJobInput, opts ...request.Option) (*batch.TerminateJobOutput, error)

TerminateJobWithContext provides a mock function with given fields: ctx, input, opts

type BatchServiceClient_DescribeJobsWithContext_Call added in v1.15.1

type BatchServiceClient_DescribeJobsWithContext_Call struct {
	*mock.Call
}

BatchServiceClient_DescribeJobsWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeJobsWithContext'

func (*BatchServiceClient_DescribeJobsWithContext_Call) Return added in v1.15.1

func (*BatchServiceClient_DescribeJobsWithContext_Call) Run added in v1.15.1

func (*BatchServiceClient_DescribeJobsWithContext_Call) RunAndReturn added in v1.15.1

type BatchServiceClient_Expecter added in v1.15.1

type BatchServiceClient_Expecter struct {
	// contains filtered or unexported fields
}

func (*BatchServiceClient_Expecter) DescribeJobsWithContext added in v1.15.1

func (_e *BatchServiceClient_Expecter) DescribeJobsWithContext(ctx interface{}, input interface{}, opts ...interface{}) *BatchServiceClient_DescribeJobsWithContext_Call

DescribeJobsWithContext is a helper method to define mock.On call

  • ctx context.Context
  • input *batch.DescribeJobsInput
  • opts ...request.Option

func (*BatchServiceClient_Expecter) RegisterJobDefinitionWithContext added in v1.15.1

func (_e *BatchServiceClient_Expecter) RegisterJobDefinitionWithContext(ctx interface{}, input interface{}, opts ...interface{}) *BatchServiceClient_RegisterJobDefinitionWithContext_Call

RegisterJobDefinitionWithContext is a helper method to define mock.On call

  • ctx context.Context
  • input *batch.RegisterJobDefinitionInput
  • opts ...request.Option

func (*BatchServiceClient_Expecter) SubmitJobWithContext added in v1.15.1

func (_e *BatchServiceClient_Expecter) SubmitJobWithContext(ctx interface{}, input interface{}, opts ...interface{}) *BatchServiceClient_SubmitJobWithContext_Call

SubmitJobWithContext is a helper method to define mock.On call

  • ctx context.Context
  • input *batch.SubmitJobInput
  • opts ...request.Option

func (*BatchServiceClient_Expecter) TerminateJobWithContext added in v1.15.1

func (_e *BatchServiceClient_Expecter) TerminateJobWithContext(ctx interface{}, input interface{}, opts ...interface{}) *BatchServiceClient_TerminateJobWithContext_Call

TerminateJobWithContext is a helper method to define mock.On call

  • ctx context.Context
  • input *batch.TerminateJobInput
  • opts ...request.Option

type BatchServiceClient_RegisterJobDefinitionWithContext_Call added in v1.15.1

type BatchServiceClient_RegisterJobDefinitionWithContext_Call struct {
	*mock.Call
}

BatchServiceClient_RegisterJobDefinitionWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterJobDefinitionWithContext'

func (*BatchServiceClient_RegisterJobDefinitionWithContext_Call) Return added in v1.15.1

func (*BatchServiceClient_RegisterJobDefinitionWithContext_Call) Run added in v1.15.1

type BatchServiceClient_SubmitJobWithContext_Call added in v1.15.1

type BatchServiceClient_SubmitJobWithContext_Call struct {
	*mock.Call
}

BatchServiceClient_SubmitJobWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubmitJobWithContext'

func (*BatchServiceClient_SubmitJobWithContext_Call) Return added in v1.15.1

func (*BatchServiceClient_SubmitJobWithContext_Call) Run added in v1.15.1

func (*BatchServiceClient_SubmitJobWithContext_Call) RunAndReturn added in v1.15.1

type BatchServiceClient_TerminateJobWithContext_Call added in v1.15.1

type BatchServiceClient_TerminateJobWithContext_Call struct {
	*mock.Call
}

BatchServiceClient_TerminateJobWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TerminateJobWithContext'

func (*BatchServiceClient_TerminateJobWithContext_Call) Return added in v1.15.1

func (*BatchServiceClient_TerminateJobWithContext_Call) Run added in v1.15.1

func (*BatchServiceClient_TerminateJobWithContext_Call) RunAndReturn added in v1.15.1

type Cache

type Cache struct {
	mock.Mock
}

Cache is an autogenerated mock type for the Cache type

func NewCache added in v1.15.1

func NewCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *Cache

NewCache creates a new instance of Cache. 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 (*Cache) EXPECT added in v1.15.1

func (_m *Cache) EXPECT() *Cache_Expecter

func (*Cache) Get

func (_m *Cache) Get(key definition.CacheKey) (string, bool)

Get provides a mock function with given fields: key

func (*Cache) Put

func (_m *Cache) Put(key definition.CacheKey, _a1 string) error

Put provides a mock function with given fields: key, _a1

type CacheKey

type CacheKey struct {
	mock.Mock
}

CacheKey is an autogenerated mock type for the CacheKey type

func NewCacheKey added in v1.15.1

func NewCacheKey(t interface {
	mock.TestingT
	Cleanup(func())
}) *CacheKey

NewCacheKey creates a new instance of CacheKey. 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 (*CacheKey) EXPECT added in v1.15.1

func (_m *CacheKey) EXPECT() *CacheKey_Expecter

func (*CacheKey) String

func (_m *CacheKey) String() string

String provides a mock function with given fields:

type CacheKey_Expecter added in v1.15.1

type CacheKey_Expecter struct {
	// contains filtered or unexported fields
}

func (*CacheKey_Expecter) String added in v1.15.1

String is a helper method to define mock.On call

type CacheKey_String_Call added in v1.15.1

type CacheKey_String_Call struct {
	*mock.Call
}

CacheKey_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String'

func (*CacheKey_String_Call) Return added in v1.15.1

func (*CacheKey_String_Call) Run added in v1.15.1

func (_c *CacheKey_String_Call) Run(run func()) *CacheKey_String_Call

func (*CacheKey_String_Call) RunAndReturn added in v1.15.1

func (_c *CacheKey_String_Call) RunAndReturn(run func() string) *CacheKey_String_Call

type Cache_Expecter added in v1.15.1

type Cache_Expecter struct {
	// contains filtered or unexported fields
}

func (*Cache_Expecter) Get added in v1.15.1

func (_e *Cache_Expecter) Get(key interface{}) *Cache_Get_Call

Get is a helper method to define mock.On call

  • key definition.CacheKey

func (*Cache_Expecter) Put added in v1.15.1

func (_e *Cache_Expecter) Put(key interface{}, _a1 interface{}) *Cache_Put_Call

Put is a helper method to define mock.On call

  • key definition.CacheKey
  • _a1 string

type Cache_Get_Call added in v1.15.1

type Cache_Get_Call struct {
	*mock.Call
}

Cache_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*Cache_Get_Call) Return added in v1.15.1

func (_c *Cache_Get_Call) Return(jobDefinition string, found bool) *Cache_Get_Call

func (*Cache_Get_Call) Run added in v1.15.1

func (_c *Cache_Get_Call) Run(run func(key definition.CacheKey)) *Cache_Get_Call

func (*Cache_Get_Call) RunAndReturn added in v1.15.1

func (_c *Cache_Get_Call) RunAndReturn(run func(definition.CacheKey) (string, bool)) *Cache_Get_Call

type Cache_Put_Call added in v1.15.1

type Cache_Put_Call struct {
	*mock.Call
}

Cache_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put'

func (*Cache_Put_Call) Return added in v1.15.1

func (_c *Cache_Put_Call) Return(_a0 error) *Cache_Put_Call

func (*Cache_Put_Call) Run added in v1.15.1

func (_c *Cache_Put_Call) Run(run func(key definition.CacheKey, _a1 string)) *Cache_Put_Call

func (*Cache_Put_Call) RunAndReturn added in v1.15.1

func (_c *Cache_Put_Call) RunAndReturn(run func(definition.CacheKey, string) error) *Cache_Put_Call

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient added in v1.15.1

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. 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 (*Client) EXPECT added in v1.15.1

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) GetAccountID

func (_m *Client) GetAccountID() string

GetAccountID provides a mock function with given fields:

func (*Client) GetJobDetailsBatch

func (_m *Client) GetJobDetailsBatch(ctx context.Context, ids []string) ([]*batch.JobDetail, error)

GetJobDetailsBatch provides a mock function with given fields: ctx, ids

func (*Client) GetRegion

func (_m *Client) GetRegion() string

GetRegion provides a mock function with given fields:

func (*Client) RegisterJobDefinition

func (_m *Client) RegisterJobDefinition(ctx context.Context, name string, image string, role string, platformCapabilities string) (string, error)

RegisterJobDefinition provides a mock function with given fields: ctx, name, image, role, platformCapabilities

func (*Client) SubmitJob

func (_m *Client) SubmitJob(ctx context.Context, input *batch.SubmitJobInput) (string, error)

SubmitJob provides a mock function with given fields: ctx, input

func (*Client) TerminateJob

func (_m *Client) TerminateJob(ctx context.Context, jobID string, reason string) error

TerminateJob provides a mock function with given fields: ctx, jobID, reason

type Client_Expecter added in v1.15.1

type Client_Expecter struct {
	// contains filtered or unexported fields
}

func (*Client_Expecter) GetAccountID added in v1.15.1

func (_e *Client_Expecter) GetAccountID() *Client_GetAccountID_Call

GetAccountID is a helper method to define mock.On call

func (*Client_Expecter) GetJobDetailsBatch added in v1.15.1

func (_e *Client_Expecter) GetJobDetailsBatch(ctx interface{}, ids interface{}) *Client_GetJobDetailsBatch_Call

GetJobDetailsBatch is a helper method to define mock.On call

  • ctx context.Context
  • ids []string

func (*Client_Expecter) GetRegion added in v1.15.1

func (_e *Client_Expecter) GetRegion() *Client_GetRegion_Call

GetRegion is a helper method to define mock.On call

func (*Client_Expecter) RegisterJobDefinition added in v1.15.1

func (_e *Client_Expecter) RegisterJobDefinition(ctx interface{}, name interface{}, image interface{}, role interface{}, platformCapabilities interface{}) *Client_RegisterJobDefinition_Call

RegisterJobDefinition is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • image string
  • role string
  • platformCapabilities string

func (*Client_Expecter) SubmitJob added in v1.15.1

func (_e *Client_Expecter) SubmitJob(ctx interface{}, input interface{}) *Client_SubmitJob_Call

SubmitJob is a helper method to define mock.On call

  • ctx context.Context
  • input *batch.SubmitJobInput

func (*Client_Expecter) TerminateJob added in v1.15.1

func (_e *Client_Expecter) TerminateJob(ctx interface{}, jobID interface{}, reason interface{}) *Client_TerminateJob_Call

TerminateJob is a helper method to define mock.On call

  • ctx context.Context
  • jobID string
  • reason string

type Client_GetAccountID_Call added in v1.15.1

type Client_GetAccountID_Call struct {
	*mock.Call
}

Client_GetAccountID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAccountID'

func (*Client_GetAccountID_Call) Return added in v1.15.1

func (*Client_GetAccountID_Call) Run added in v1.15.1

func (*Client_GetAccountID_Call) RunAndReturn added in v1.15.1

func (_c *Client_GetAccountID_Call) RunAndReturn(run func() string) *Client_GetAccountID_Call

type Client_GetJobDetailsBatch_Call added in v1.15.1

type Client_GetJobDetailsBatch_Call struct {
	*mock.Call
}

Client_GetJobDetailsBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobDetailsBatch'

func (*Client_GetJobDetailsBatch_Call) Return added in v1.15.1

func (*Client_GetJobDetailsBatch_Call) Run added in v1.15.1

func (*Client_GetJobDetailsBatch_Call) RunAndReturn added in v1.15.1

type Client_GetRegion_Call added in v1.15.1

type Client_GetRegion_Call struct {
	*mock.Call
}

Client_GetRegion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRegion'

func (*Client_GetRegion_Call) Return added in v1.15.1

func (*Client_GetRegion_Call) Run added in v1.15.1

func (_c *Client_GetRegion_Call) Run(run func()) *Client_GetRegion_Call

func (*Client_GetRegion_Call) RunAndReturn added in v1.15.1

func (_c *Client_GetRegion_Call) RunAndReturn(run func() string) *Client_GetRegion_Call

type Client_RegisterJobDefinition_Call added in v1.15.1

type Client_RegisterJobDefinition_Call struct {
	*mock.Call
}

Client_RegisterJobDefinition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterJobDefinition'

func (*Client_RegisterJobDefinition_Call) Return added in v1.15.1

func (*Client_RegisterJobDefinition_Call) Run added in v1.15.1

func (_c *Client_RegisterJobDefinition_Call) Run(run func(ctx context.Context, name string, image string, role string, platformCapabilities string)) *Client_RegisterJobDefinition_Call

func (*Client_RegisterJobDefinition_Call) RunAndReturn added in v1.15.1

type Client_SubmitJob_Call added in v1.15.1

type Client_SubmitJob_Call struct {
	*mock.Call
}

Client_SubmitJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubmitJob'

func (*Client_SubmitJob_Call) Return added in v1.15.1

func (_c *Client_SubmitJob_Call) Return(jobID string, err error) *Client_SubmitJob_Call

func (*Client_SubmitJob_Call) Run added in v1.15.1

func (*Client_SubmitJob_Call) RunAndReturn added in v1.15.1

type Client_TerminateJob_Call added in v1.15.1

type Client_TerminateJob_Call struct {
	*mock.Call
}

Client_TerminateJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TerminateJob'

func (*Client_TerminateJob_Call) Return added in v1.15.1

func (*Client_TerminateJob_Call) Run added in v1.15.1

func (_c *Client_TerminateJob_Call) Run(run func(ctx context.Context, jobID string, reason string)) *Client_TerminateJob_Call

func (*Client_TerminateJob_Call) RunAndReturn added in v1.15.1

type MockAwsBatchClient

type MockAwsBatchClient struct {
	SubmitJobWithContextCb             func(ctx context.Context, input *batch.SubmitJobInput, opts ...request.Option) (*batch.SubmitJobOutput, error)
	TerminateJobWithContextCb          func(ctx context.Context, input *batch.TerminateJobInput, opts ...request.Option) (*batch.TerminateJobOutput, error)
	DescribeJobsWithContextCb          func(ctx context.Context, input *batch.DescribeJobsInput, opts ...request.Option) (*batch.DescribeJobsOutput, error)
	RegisterJobDefinitionWithContextCb func(ctx context.Context, input *batch.RegisterJobDefinitionInput, opts ...request.Option) (*batch.RegisterJobDefinitionOutput, error)
	// contains filtered or unexported fields
}

func NewMockAwsBatchClient

func NewMockAwsBatchClient() *MockAwsBatchClient

Creates a new client with overridable behavior for certain APIs. The default implementation will progress submitted jobs until completion every time GetJobDetails is called.

func (*MockAwsBatchClient) DescribeJobsWithContext

func (m *MockAwsBatchClient) DescribeJobsWithContext(ctx aws.Context, input *batch.DescribeJobsInput,
	opts ...request.Option) (*batch.DescribeJobsOutput, error)

func (*MockAwsBatchClient) RegisterJobDefinitionWithContext

func (m *MockAwsBatchClient) RegisterJobDefinitionWithContext(ctx aws.Context, input *batch.RegisterJobDefinitionInput,
	opts ...request.Option) (*batch.RegisterJobDefinitionOutput, error)

func (*MockAwsBatchClient) SubmitJobWithContext

func (m *MockAwsBatchClient) SubmitJobWithContext(ctx aws.Context, input *batch.SubmitJobInput, opts ...request.Option) (
	*batch.SubmitJobOutput, error)

func (*MockAwsBatchClient) TerminateJobWithContext

func (m *MockAwsBatchClient) TerminateJobWithContext(ctx aws.Context, input *batch.TerminateJobInput,
	opts ...request.Option) (*batch.TerminateJobOutput, error)

Jump to

Keyboard shortcuts

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