Documentation
¶
Index ¶
- type S3ClienterMock
- func (mock *S3ClienterMock) Checker(ctx context.Context, state *healthcheck.CheckState) error
- func (mock *S3ClienterMock) CheckerCalls() []struct{ ... }
- func (mock *S3ClienterMock) Delete(ctx context.Context, key string) error
- func (mock *S3ClienterMock) DeleteCalls() []struct{ ... }
- func (mock *S3ClienterMock) Head(ctx context.Context, key string) (*s3.HeadObjectOutput, error)
- func (mock *S3ClienterMock) HeadCalls() []struct{ ... }
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
// DeleteFunc mocks the Delete method.
DeleteFunc func(ctx context.Context, key string) error
// HeadFunc mocks the Head method.
HeadFunc func(ctx context.Context, 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")
},
DeleteFunc: func(ctx context.Context, key string) error {
panic("mock out the Delete method")
},
HeadFunc: func(ctx context.Context, 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) Delete ¶ added in v1.10.0
func (mock *S3ClienterMock) Delete(ctx context.Context, key string) error
Delete calls DeleteFunc.
func (*S3ClienterMock) DeleteCalls ¶ added in v1.10.0
func (mock *S3ClienterMock) DeleteCalls() []struct { Ctx context.Context Key string }
DeleteCalls gets all the calls that were made to Delete. Check the length with:
len(mockedS3Clienter.DeleteCalls())
func (*S3ClienterMock) Head ¶
func (mock *S3ClienterMock) Head(ctx context.Context, key string) (*s3.HeadObjectOutput, error)
Head calls HeadFunc.
Click to show internal directories.
Click to hide internal directories.