sdkfakes

package
v0.0.0-...-a9f80de Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Code generated by counterfeiter. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var NoUpdateRequiredException awserr.Error = &MockAWSError{
	C: "No updates",
	M: "No updates",
}
View Source
var ResourceNotFoundException awserr.Error = &MockAWSError{
	C: "ResourceNotFoundException",
	M: "fake version of error returned when no stack",
}

Functions

This section is empty.

Types

type FakeClient

type FakeClient struct {
	AssumeRoleStub func(string) sdk.Client

	BatchDeleteImageWithContextStub func(context.Context, *ecr.BatchDeleteImageInput, ...request.Option) (*ecr.BatchDeleteImageOutput, error)

	CreateStackWithContextStub func(context.Context, *cloudformation.CreateStackInput, ...request.Option) (*cloudformation.CreateStackOutput, error)

	DeleteObjectsWithContextStub func(context.Context, *s3.DeleteObjectsInput, ...request.Option) (*s3.DeleteObjectsOutput, error)

	DeleteStackWithContextStub func(context.Context, *cloudformation.DeleteStackInput, ...request.Option) (*cloudformation.DeleteStackOutput, error)

	DescribeImagesPagesWithContextStub func(context.Context, *ecr.DescribeImagesInput, func(*ecr.DescribeImagesOutput, bool) bool, ...request.Option) error

	DescribeStackEventsWithContextStub func(context.Context, *cloudformation.DescribeStackEventsInput, ...request.Option) (*cloudformation.DescribeStackEventsOutput, error)

	DescribeStacksWithContextStub func(context.Context, *cloudformation.DescribeStacksInput, ...request.Option) (*cloudformation.DescribeStacksOutput, error)

	GetAuthorizationTokenWithContextStub func(context.Context, *ecr.GetAuthorizationTokenInput, ...request.Option) (*ecr.GetAuthorizationTokenOutput, error)

	GetRoleCredentialsStub func(string) *credentials.Credentials

	GetSecretValueWithContextStub func(context.Context, *secretsmanager.GetSecretValueInput, ...request.Option) (*secretsmanager.GetSecretValueOutput, error)

	ListObjectsV2PagesWithContextStub func(context.Context, *s3.ListObjectsV2Input, func(*s3.ListObjectsV2Output, bool) bool, ...request.Option) error

	UpdateStackWithContextStub func(context.Context, *cloudformation.UpdateStackInput, ...request.Option) (*cloudformation.UpdateStackOutput, error)
	// contains filtered or unexported fields
}

func NewHappyClient

func NewHappyClient(outputs map[string]string) *FakeClient

NewHappyClient creates a fake AWSClient that attempts to stub the state transitions of a cloudformation stack for use in tests without real AWSClient

The client will act like a "happy" aws, that transitions cleanly through:

client.CreateStack() -> ok client.DescribeStack() -> CREATE_IN_PROGRESS client.DescribeStack() -> CREATED_COMPLETED (few seconds later) client.UpdateStack() -> ok (no update required) client.DeleteStack() -> ok client.DescribeStack() -> DELETE_IN_PROGRESS client.DescribeStack() -> DELETE_COMPLETED (few seconds later)

an attempt to call a client method outside of the happy path will cause error.

stacks returned from DescribeStack methods will contain Outputs extracted from the template used in CreateStack.

func (*FakeClient) AssumeRole

func (fake *FakeClient) AssumeRole(arg1 string) sdk.Client

func (*FakeClient) AssumeRoleArgsForCall

func (fake *FakeClient) AssumeRoleArgsForCall(i int) string

func (*FakeClient) AssumeRoleCallCount

func (fake *FakeClient) AssumeRoleCallCount() int

func (*FakeClient) AssumeRoleCalls

func (fake *FakeClient) AssumeRoleCalls(stub func(string) sdk.Client)

func (*FakeClient) AssumeRoleReturns

func (fake *FakeClient) AssumeRoleReturns(result1 sdk.Client)

func (*FakeClient) AssumeRoleReturnsOnCall

func (fake *FakeClient) AssumeRoleReturnsOnCall(i int, result1 sdk.Client)

func (*FakeClient) BatchDeleteImageWithContext

func (fake *FakeClient) BatchDeleteImageWithContext(arg1 context.Context, arg2 *ecr.BatchDeleteImageInput, arg3 ...request.Option) (*ecr.BatchDeleteImageOutput, error)

func (*FakeClient) BatchDeleteImageWithContextArgsForCall

func (fake *FakeClient) BatchDeleteImageWithContextArgsForCall(i int) (context.Context, *ecr.BatchDeleteImageInput, []request.Option)

func (*FakeClient) BatchDeleteImageWithContextCallCount

func (fake *FakeClient) BatchDeleteImageWithContextCallCount() int

func (*FakeClient) BatchDeleteImageWithContextCalls

func (fake *FakeClient) BatchDeleteImageWithContextCalls(stub func(context.Context, *ecr.BatchDeleteImageInput, ...request.Option) (*ecr.BatchDeleteImageOutput, error))

func (*FakeClient) BatchDeleteImageWithContextReturns

func (fake *FakeClient) BatchDeleteImageWithContextReturns(result1 *ecr.BatchDeleteImageOutput, result2 error)

func (*FakeClient) BatchDeleteImageWithContextReturnsOnCall

func (fake *FakeClient) BatchDeleteImageWithContextReturnsOnCall(i int, result1 *ecr.BatchDeleteImageOutput, result2 error)

func (*FakeClient) CreateStackWithContext

func (fake *FakeClient) CreateStackWithContext(arg1 context.Context, arg2 *cloudformation.CreateStackInput, arg3 ...request.Option) (*cloudformation.CreateStackOutput, error)

func (*FakeClient) CreateStackWithContextArgsForCall

func (fake *FakeClient) CreateStackWithContextArgsForCall(i int) (context.Context, *cloudformation.CreateStackInput, []request.Option)

func (*FakeClient) CreateStackWithContextCallCount

func (fake *FakeClient) CreateStackWithContextCallCount() int

func (*FakeClient) CreateStackWithContextCalls

func (fake *FakeClient) CreateStackWithContextCalls(stub func(context.Context, *cloudformation.CreateStackInput, ...request.Option) (*cloudformation.CreateStackOutput, error))

func (*FakeClient) CreateStackWithContextReturns

func (fake *FakeClient) CreateStackWithContextReturns(result1 *cloudformation.CreateStackOutput, result2 error)

func (*FakeClient) CreateStackWithContextReturnsOnCall

func (fake *FakeClient) CreateStackWithContextReturnsOnCall(i int, result1 *cloudformation.CreateStackOutput, result2 error)

func (*FakeClient) DeleteObjectsWithContext

func (fake *FakeClient) DeleteObjectsWithContext(arg1 context.Context, arg2 *s3.DeleteObjectsInput, arg3 ...request.Option) (*s3.DeleteObjectsOutput, error)

func (*FakeClient) DeleteObjectsWithContextArgsForCall

func (fake *FakeClient) DeleteObjectsWithContextArgsForCall(i int) (context.Context, *s3.DeleteObjectsInput, []request.Option)

func (*FakeClient) DeleteObjectsWithContextCallCount

func (fake *FakeClient) DeleteObjectsWithContextCallCount() int

func (*FakeClient) DeleteObjectsWithContextCalls

func (fake *FakeClient) DeleteObjectsWithContextCalls(stub func(context.Context, *s3.DeleteObjectsInput, ...request.Option) (*s3.DeleteObjectsOutput, error))

func (*FakeClient) DeleteObjectsWithContextReturns

func (fake *FakeClient) DeleteObjectsWithContextReturns(result1 *s3.DeleteObjectsOutput, result2 error)

func (*FakeClient) DeleteObjectsWithContextReturnsOnCall

func (fake *FakeClient) DeleteObjectsWithContextReturnsOnCall(i int, result1 *s3.DeleteObjectsOutput, result2 error)

func (*FakeClient) DeleteStackWithContext

func (fake *FakeClient) DeleteStackWithContext(arg1 context.Context, arg2 *cloudformation.DeleteStackInput, arg3 ...request.Option) (*cloudformation.DeleteStackOutput, error)

func (*FakeClient) DeleteStackWithContextArgsForCall

func (fake *FakeClient) DeleteStackWithContextArgsForCall(i int) (context.Context, *cloudformation.DeleteStackInput, []request.Option)

func (*FakeClient) DeleteStackWithContextCallCount

func (fake *FakeClient) DeleteStackWithContextCallCount() int

func (*FakeClient) DeleteStackWithContextCalls

func (fake *FakeClient) DeleteStackWithContextCalls(stub func(context.Context, *cloudformation.DeleteStackInput, ...request.Option) (*cloudformation.DeleteStackOutput, error))

func (*FakeClient) DeleteStackWithContextReturns

func (fake *FakeClient) DeleteStackWithContextReturns(result1 *cloudformation.DeleteStackOutput, result2 error)

func (*FakeClient) DeleteStackWithContextReturnsOnCall

func (fake *FakeClient) DeleteStackWithContextReturnsOnCall(i int, result1 *cloudformation.DeleteStackOutput, result2 error)

func (*FakeClient) DescribeImagesPagesWithContext

func (fake *FakeClient) DescribeImagesPagesWithContext(arg1 context.Context, arg2 *ecr.DescribeImagesInput, arg3 func(*ecr.DescribeImagesOutput, bool) bool, arg4 ...request.Option) error

func (*FakeClient) DescribeImagesPagesWithContextArgsForCall

func (fake *FakeClient) DescribeImagesPagesWithContextArgsForCall(i int) (context.Context, *ecr.DescribeImagesInput, func(*ecr.DescribeImagesOutput, bool) bool, []request.Option)

func (*FakeClient) DescribeImagesPagesWithContextCallCount

func (fake *FakeClient) DescribeImagesPagesWithContextCallCount() int

func (*FakeClient) DescribeImagesPagesWithContextCalls

func (fake *FakeClient) DescribeImagesPagesWithContextCalls(stub func(context.Context, *ecr.DescribeImagesInput, func(*ecr.DescribeImagesOutput, bool) bool, ...request.Option) error)

func (*FakeClient) DescribeImagesPagesWithContextReturns

func (fake *FakeClient) DescribeImagesPagesWithContextReturns(result1 error)

func (*FakeClient) DescribeImagesPagesWithContextReturnsOnCall

func (fake *FakeClient) DescribeImagesPagesWithContextReturnsOnCall(i int, result1 error)

func (*FakeClient) DescribeStackEventsWithContext

func (fake *FakeClient) DescribeStackEventsWithContext(arg1 context.Context, arg2 *cloudformation.DescribeStackEventsInput, arg3 ...request.Option) (*cloudformation.DescribeStackEventsOutput, error)

func (*FakeClient) DescribeStackEventsWithContextArgsForCall

func (fake *FakeClient) DescribeStackEventsWithContextArgsForCall(i int) (context.Context, *cloudformation.DescribeStackEventsInput, []request.Option)

func (*FakeClient) DescribeStackEventsWithContextCallCount

func (fake *FakeClient) DescribeStackEventsWithContextCallCount() int

func (*FakeClient) DescribeStackEventsWithContextReturns

func (fake *FakeClient) DescribeStackEventsWithContextReturns(result1 *cloudformation.DescribeStackEventsOutput, result2 error)

func (*FakeClient) DescribeStackEventsWithContextReturnsOnCall

func (fake *FakeClient) DescribeStackEventsWithContextReturnsOnCall(i int, result1 *cloudformation.DescribeStackEventsOutput, result2 error)

func (*FakeClient) DescribeStacksWithContext

func (fake *FakeClient) DescribeStacksWithContext(arg1 context.Context, arg2 *cloudformation.DescribeStacksInput, arg3 ...request.Option) (*cloudformation.DescribeStacksOutput, error)

func (*FakeClient) DescribeStacksWithContextArgsForCall

func (fake *FakeClient) DescribeStacksWithContextArgsForCall(i int) (context.Context, *cloudformation.DescribeStacksInput, []request.Option)

func (*FakeClient) DescribeStacksWithContextCallCount

func (fake *FakeClient) DescribeStacksWithContextCallCount() int

func (*FakeClient) DescribeStacksWithContextCalls

func (fake *FakeClient) DescribeStacksWithContextCalls(stub func(context.Context, *cloudformation.DescribeStacksInput, ...request.Option) (*cloudformation.DescribeStacksOutput, error))

func (*FakeClient) DescribeStacksWithContextReturns

func (fake *FakeClient) DescribeStacksWithContextReturns(result1 *cloudformation.DescribeStacksOutput, result2 error)

func (*FakeClient) DescribeStacksWithContextReturnsOnCall

func (fake *FakeClient) DescribeStacksWithContextReturnsOnCall(i int, result1 *cloudformation.DescribeStacksOutput, result2 error)

func (*FakeClient) GetAuthorizationTokenWithContext

func (fake *FakeClient) GetAuthorizationTokenWithContext(arg1 context.Context, arg2 *ecr.GetAuthorizationTokenInput, arg3 ...request.Option) (*ecr.GetAuthorizationTokenOutput, error)

func (*FakeClient) GetAuthorizationTokenWithContextArgsForCall

func (fake *FakeClient) GetAuthorizationTokenWithContextArgsForCall(i int) (context.Context, *ecr.GetAuthorizationTokenInput, []request.Option)

func (*FakeClient) GetAuthorizationTokenWithContextCallCount

func (fake *FakeClient) GetAuthorizationTokenWithContextCallCount() int

func (*FakeClient) GetAuthorizationTokenWithContextCalls

func (fake *FakeClient) GetAuthorizationTokenWithContextCalls(stub func(context.Context, *ecr.GetAuthorizationTokenInput, ...request.Option) (*ecr.GetAuthorizationTokenOutput, error))

func (*FakeClient) GetAuthorizationTokenWithContextReturns

func (fake *FakeClient) GetAuthorizationTokenWithContextReturns(result1 *ecr.GetAuthorizationTokenOutput, result2 error)

func (*FakeClient) GetAuthorizationTokenWithContextReturnsOnCall

func (fake *FakeClient) GetAuthorizationTokenWithContextReturnsOnCall(i int, result1 *ecr.GetAuthorizationTokenOutput, result2 error)

func (*FakeClient) GetRoleCredentials

func (fake *FakeClient) GetRoleCredentials(arg1 string) *credentials.Credentials

func (*FakeClient) GetRoleCredentialsArgsForCall

func (fake *FakeClient) GetRoleCredentialsArgsForCall(i int) string

func (*FakeClient) GetRoleCredentialsCallCount

func (fake *FakeClient) GetRoleCredentialsCallCount() int

func (*FakeClient) GetRoleCredentialsCalls

func (fake *FakeClient) GetRoleCredentialsCalls(stub func(string) *credentials.Credentials)

func (*FakeClient) GetRoleCredentialsReturns

func (fake *FakeClient) GetRoleCredentialsReturns(result1 *credentials.Credentials)

func (*FakeClient) GetRoleCredentialsReturnsOnCall

func (fake *FakeClient) GetRoleCredentialsReturnsOnCall(i int, result1 *credentials.Credentials)

func (*FakeClient) GetSecretValueWithContext

func (fake *FakeClient) GetSecretValueWithContext(arg1 context.Context, arg2 *secretsmanager.GetSecretValueInput, arg3 ...request.Option) (*secretsmanager.GetSecretValueOutput, error)

func (*FakeClient) GetSecretValueWithContextArgsForCall

func (fake *FakeClient) GetSecretValueWithContextArgsForCall(i int) (context.Context, *secretsmanager.GetSecretValueInput, []request.Option)

func (*FakeClient) GetSecretValueWithContextCallCount

func (fake *FakeClient) GetSecretValueWithContextCallCount() int

func (*FakeClient) GetSecretValueWithContextCalls

func (fake *FakeClient) GetSecretValueWithContextCalls(stub func(context.Context, *secretsmanager.GetSecretValueInput, ...request.Option) (*secretsmanager.GetSecretValueOutput, error))

func (*FakeClient) GetSecretValueWithContextReturns

func (fake *FakeClient) GetSecretValueWithContextReturns(result1 *secretsmanager.GetSecretValueOutput, result2 error)

func (*FakeClient) GetSecretValueWithContextReturnsOnCall

func (fake *FakeClient) GetSecretValueWithContextReturnsOnCall(i int, result1 *secretsmanager.GetSecretValueOutput, result2 error)

func (*FakeClient) Invocations

func (fake *FakeClient) Invocations() map[string][][]interface{}

func (*FakeClient) ListObjectsV2PagesWithContext

func (fake *FakeClient) ListObjectsV2PagesWithContext(arg1 context.Context, arg2 *s3.ListObjectsV2Input, arg3 func(*s3.ListObjectsV2Output, bool) bool, arg4 ...request.Option) error

func (*FakeClient) ListObjectsV2PagesWithContextArgsForCall

func (fake *FakeClient) ListObjectsV2PagesWithContextArgsForCall(i int) (context.Context, *s3.ListObjectsV2Input, func(*s3.ListObjectsV2Output, bool) bool, []request.Option)

func (*FakeClient) ListObjectsV2PagesWithContextCallCount

func (fake *FakeClient) ListObjectsV2PagesWithContextCallCount() int

func (*FakeClient) ListObjectsV2PagesWithContextCalls

func (fake *FakeClient) ListObjectsV2PagesWithContextCalls(stub func(context.Context, *s3.ListObjectsV2Input, func(*s3.ListObjectsV2Output, bool) bool, ...request.Option) error)

func (*FakeClient) ListObjectsV2PagesWithContextReturns

func (fake *FakeClient) ListObjectsV2PagesWithContextReturns(result1 error)

func (*FakeClient) ListObjectsV2PagesWithContextReturnsOnCall

func (fake *FakeClient) ListObjectsV2PagesWithContextReturnsOnCall(i int, result1 error)

func (*FakeClient) UpdateStackWithContext

func (fake *FakeClient) UpdateStackWithContext(arg1 context.Context, arg2 *cloudformation.UpdateStackInput, arg3 ...request.Option) (*cloudformation.UpdateStackOutput, error)

func (*FakeClient) UpdateStackWithContextArgsForCall

func (fake *FakeClient) UpdateStackWithContextArgsForCall(i int) (context.Context, *cloudformation.UpdateStackInput, []request.Option)

func (*FakeClient) UpdateStackWithContextCallCount

func (fake *FakeClient) UpdateStackWithContextCallCount() int

func (*FakeClient) UpdateStackWithContextCalls

func (fake *FakeClient) UpdateStackWithContextCalls(stub func(context.Context, *cloudformation.UpdateStackInput, ...request.Option) (*cloudformation.UpdateStackOutput, error))

func (*FakeClient) UpdateStackWithContextReturns

func (fake *FakeClient) UpdateStackWithContextReturns(result1 *cloudformation.UpdateStackOutput, result2 error)

func (*FakeClient) UpdateStackWithContextReturnsOnCall

func (fake *FakeClient) UpdateStackWithContextReturnsOnCall(i int, result1 *cloudformation.UpdateStackOutput, result2 error)

type FakeOutput

type FakeOutput struct {
	Description string      `json:"Description"`
	Value       interface{} `json:"Value"`
	Ref         string      `json:"Ref"`
}

type FakeTemplate

type FakeTemplate struct {
	Outputs map[string]FakeOutput `json:"Outputs"`
}

type MockAWSError

type MockAWSError struct {
	C string
	M string
	O error
}

func (*MockAWSError) Code

func (err *MockAWSError) Code() string

func (*MockAWSError) Error

func (err *MockAWSError) Error() string

func (*MockAWSError) Message

func (err *MockAWSError) Message() string

func (*MockAWSError) OrigErr

func (err *MockAWSError) OrigErr() error

Jump to

Keyboard shortcuts

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