Documentation ¶
Index ¶
- type S3ClienterMock
- func (mock *S3ClienterMock) CheckPartUploaded(ctx context.Context, req *s3client.UploadPartRequest) (bool, error)
- func (mock *S3ClienterMock) CheckPartUploadedCalls() []struct{ ... }
- func (mock *S3ClienterMock) Checker(ctx context.Context, state *healthcheck.CheckState) error
- func (mock *S3ClienterMock) CheckerCalls() []struct{ ... }
- func (mock *S3ClienterMock) Head(key string) (*s3.HeadObjectOutput, error)
- func (mock *S3ClienterMock) HeadCalls() []struct{ ... }
- func (mock *S3ClienterMock) UploadPart(ctx context.Context, req *s3client.UploadPartRequest, payload []byte) (s3client.MultipartUploadResponse, error)
- func (mock *S3ClienterMock) UploadPartCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3ClienterMock ¶
type S3ClienterMock struct { // CheckPartUploadedFunc mocks the CheckPartUploaded method. CheckPartUploadedFunc func(ctx context.Context, req *s3client.UploadPartRequest) (bool, error) // 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) // UploadPartFunc mocks the UploadPart method. UploadPartFunc func(ctx context.Context, req *s3client.UploadPartRequest, payload []byte) (s3client.MultipartUploadResponse, 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{ CheckPartUploadedFunc: func(ctx context.Context, req *s3client.UploadPartRequest) (bool, error) { panic("mock out the CheckPartUploaded method") }, 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") }, UploadPartFunc: func(ctx context.Context, req *s3client.UploadPartRequest, payload []byte) (s3client.MultipartUploadResponse, error) { panic("mock out the UploadPart method") }, } // use mockedS3Clienter in code that requires aws.S3Clienter // and then make assertions. }
func (*S3ClienterMock) CheckPartUploaded ¶
func (mock *S3ClienterMock) CheckPartUploaded(ctx context.Context, req *s3client.UploadPartRequest) (bool, error)
CheckPartUploaded calls CheckPartUploadedFunc.
func (*S3ClienterMock) CheckPartUploadedCalls ¶
func (mock *S3ClienterMock) CheckPartUploadedCalls() []struct { Ctx context.Context Req *s3client.UploadPartRequest }
CheckPartUploadedCalls gets all the calls that were made to CheckPartUploaded. Check the length with:
len(mockedS3Clienter.CheckPartUploadedCalls())
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())
func (*S3ClienterMock) UploadPart ¶
func (mock *S3ClienterMock) UploadPart(ctx context.Context, req *s3client.UploadPartRequest, payload []byte) (s3client.MultipartUploadResponse, error)
UploadPart calls UploadPartFunc.
func (*S3ClienterMock) UploadPartCalls ¶
func (mock *S3ClienterMock) UploadPartCalls() []struct { Ctx context.Context Req *s3client.UploadPartRequest Payload []byte }
UploadPartCalls gets all the calls that were made to UploadPart. Check the length with:
len(mockedS3Clienter.UploadPartCalls())
Click to show internal directories.
Click to hide internal directories.