Documentation ¶
Index ¶
- type DownloadServiceAPIClientMock
- func (mock *DownloadServiceAPIClientMock) Checker(ctx context.Context, state *healthcheck.CheckState) error
- func (mock *DownloadServiceAPIClientMock) CheckerCalls() []struct{ ... }
- func (mock *DownloadServiceAPIClientMock) Download(ctx context.Context, path string) (*download.Response, error)
- func (mock *DownloadServiceAPIClientMock) DownloadCalls() []struct{ ... }
- type ProviderMock
- type S3BucketMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadServiceAPIClientMock ¶
type DownloadServiceAPIClientMock struct { // CheckerFunc mocks the Checker method. CheckerFunc func(ctx context.Context, state *healthcheck.CheckState) error // DownloadFunc mocks the Download method. DownloadFunc func(ctx context.Context, path string) (*download.Response, error) // contains filtered or unexported fields }
DownloadServiceAPIClientMock is a mock implementation of storage.DownloadServiceAPIClient.
func TestSomethingThatUsesDownloadServiceAPIClient(t *testing.T) { // make and configure a mocked storage.DownloadServiceAPIClient mockedDownloadServiceAPIClient := &DownloadServiceAPIClientMock{ CheckerFunc: func(ctx context.Context, state *healthcheck.CheckState) error { panic("mock out the Checker method") }, DownloadFunc: func(ctx context.Context, path string) (*download.Response, error) { panic("mock out the Download method") }, } // use mockedDownloadServiceAPIClient in code that requires storage.DownloadServiceAPIClient // and then make assertions. }
func (*DownloadServiceAPIClientMock) Checker ¶
func (mock *DownloadServiceAPIClientMock) Checker(ctx context.Context, state *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*DownloadServiceAPIClientMock) CheckerCalls ¶
func (mock *DownloadServiceAPIClientMock) CheckerCalls() []struct { Ctx context.Context State *healthcheck.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedDownloadServiceAPIClient.CheckerCalls())
func (*DownloadServiceAPIClientMock) Download ¶
func (mock *DownloadServiceAPIClientMock) Download(ctx context.Context, path string) (*download.Response, error)
Download calls DownloadFunc.
func (*DownloadServiceAPIClientMock) DownloadCalls ¶
func (mock *DownloadServiceAPIClientMock) DownloadCalls() []struct { Ctx context.Context Path string }
DownloadCalls gets all the calls that were made to Download. Check the length with:
len(mockedDownloadServiceAPIClient.DownloadCalls())
type ProviderMock ¶
type ProviderMock struct { // CheckerFunc mocks the Checker method. CheckerFunc func() func(context.Context, *healthcheck.CheckState) error // GetFunc mocks the Get method. GetFunc func(contextMoqParam context.Context, s string) (io.ReadCloser, error) // contains filtered or unexported fields }
ProviderMock is a mock implementation of storage.Provider.
func TestSomethingThatUsesProvider(t *testing.T) { // make and configure a mocked storage.Provider mockedProvider := &ProviderMock{ CheckerFunc: func() func(context.Context, *healthcheck.CheckState) error { panic("mock out the Checker method") }, GetFunc: func(contextMoqParam context.Context, s string) (io.ReadCloser, error) { panic("mock out the Get method") }, } // use mockedProvider in code that requires storage.Provider // and then make assertions. }
func (*ProviderMock) Checker ¶
func (mock *ProviderMock) Checker() func(context.Context, *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*ProviderMock) CheckerCalls ¶
func (mock *ProviderMock) CheckerCalls() []struct { }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedProvider.CheckerCalls())
func (*ProviderMock) Get ¶
func (mock *ProviderMock) Get(contextMoqParam context.Context, s string) (io.ReadCloser, error)
Get calls GetFunc.
type S3BucketMock ¶
type S3BucketMock struct { // CheckerFunc mocks the Checker method. CheckerFunc func(ctx context.Context, state *healthcheck.CheckState) error // GetFunc mocks the Get method. GetFunc func(key string) (io.ReadCloser, *int64, error) // contains filtered or unexported fields }
S3BucketMock is a mock implementation of storage.S3Bucket.
func TestSomethingThatUsesS3Bucket(t *testing.T) { // make and configure a mocked storage.S3Bucket mockedS3Bucket := &S3BucketMock{ CheckerFunc: func(ctx context.Context, state *healthcheck.CheckState) error { panic("mock out the Checker method") }, GetFunc: func(key string) (io.ReadCloser, *int64, error) { panic("mock out the Get method") }, } // use mockedS3Bucket in code that requires storage.S3Bucket // and then make assertions. }
func (*S3BucketMock) Checker ¶
func (mock *S3BucketMock) Checker(ctx context.Context, state *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*S3BucketMock) CheckerCalls ¶
func (mock *S3BucketMock) CheckerCalls() []struct { Ctx context.Context State *healthcheck.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedS3Bucket.CheckerCalls())
func (*S3BucketMock) Get ¶
func (mock *S3BucketMock) Get(key string) (io.ReadCloser, *int64, error)
Get calls GetFunc.
func (*S3BucketMock) GetCalls ¶
func (mock *S3BucketMock) GetCalls() []struct { Key string }
GetCalls gets all the calls that were made to Get. Check the length with:
len(mockedS3Bucket.GetCalls())