Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3ClienterMock ¶
type S3ClienterMock struct { // CheckerFunc mocks the Checker method. CheckerFunc func(ctx context.Context, state *healthcheck.CheckState) error // HeadFunc mocks the Head method. HeadFunc func(key string) (*s3.HeadObjectOutput, error) // contains filtered or unexported fields }
S3ClienterMock is a mock implementation of aws.S3Clienter.
func TestSomethingThatUsesS3Clienter(t *testing.T) { // make and configure a mocked aws.S3Clienter mockedS3Clienter := &S3ClienterMock{ CheckerFunc: func(ctx context.Context, state *healthcheck.CheckState) error { panic("mock out the Checker method") }, HeadFunc: func(key string) (*s3.HeadObjectOutput, error) { panic("mock out the Head method") }, } // use mockedS3Clienter in code that requires aws.S3Clienter // and then make assertions. }
func (*S3ClienterMock) Checker ¶
func (mock *S3ClienterMock) Checker(ctx context.Context, state *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*S3ClienterMock) CheckerCalls ¶
func (mock *S3ClienterMock) CheckerCalls() []struct { Ctx context.Context State *healthcheck.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedS3Clienter.CheckerCalls())
func (*S3ClienterMock) Head ¶
func (mock *S3ClienterMock) Head(key string) (*s3.HeadObjectOutput, error)
Head calls HeadFunc.
func (*S3ClienterMock) HeadCalls ¶
func (mock *S3ClienterMock) HeadCalls() []struct { Key string }
HeadCalls gets all the calls that were made to Head. Check the length with:
len(mockedS3Clienter.HeadCalls())
Click to show internal directories.
Click to hide internal directories.