mock_aws

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

	// 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.

func (*S3ClienterMock) HeadCalls

func (mock *S3ClienterMock) HeadCalls() []struct {
	Ctx context.Context
	Key string
}

HeadCalls gets all the calls that were made to Head. Check the length with:

len(mockedS3Clienter.HeadCalls())

Jump to

Keyboard shortcuts

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