mocks

package
v1.16.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SectretsManagerClient

type SectretsManagerClient struct {
	// GetSecretValueFunc mocks the GetSecretValue method.
	GetSecretValueFunc func(ctx context.Context, params *secretsmanager.GetSecretValueInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error)
	// contains filtered or unexported fields
}

SectretsManagerClient is a mock implementation of secrets.secretsmanagerClient.

func TestSomethingThatUsessecretsmanagerClient(t *testing.T) {

	// make and configure a mocked secrets.secretsmanagerClient
	mockedsecretsmanagerClient := &SectretsManagerClient{
		GetSecretValueFunc: func(ctx context.Context, params *secretsmanager.GetSecretValueInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error) {
			panic("mock out the GetSecretValue method")
		},
	}

	// use mockedsecretsmanagerClient in code that requires secrets.secretsmanagerClient
	// and then make assertions.

}

func (*SectretsManagerClient) GetSecretValue

GetSecretValue calls GetSecretValueFunc.

func (*SectretsManagerClient) GetSecretValueCalls

func (mock *SectretsManagerClient) GetSecretValueCalls() []struct {
	Ctx    context.Context
	Params *secretsmanager.GetSecretValueInput
	OptFns []func(*secretsmanager.Options)
}

GetSecretValueCalls gets all the calls that were made to GetSecretValue. Check the length with:

len(mockedsecretsmanagerClient.GetSecretValueCalls())

Jump to

Keyboard shortcuts

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