Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecretProvider ¶
type SecretProvider struct { // GetFunc mocks the Get method. GetFunc func(key string) (string, error) // contains filtered or unexported fields }
SecretProvider is a mock implementation of config.secretsProvider.
func TestSomethingThatUsessecretsProvider(t *testing.T) { // make and configure a mocked config.secretsProvider mockedsecretsProvider := &SecretProvider{ GetFunc: func(key string) (string, error) { panic("mock out the Get method") }, } // use mockedsecretsProvider in code that requires config.secretsProvider // and then make assertions. }
func (*SecretProvider) Get ¶
func (mock *SecretProvider) Get(key string) (string, error)
Get calls GetFunc.
func (*SecretProvider) GetCalls ¶
func (mock *SecretProvider) GetCalls() []struct { Key string }
GetCalls gets all the calls that were made to Get. Check the length with:
len(mockedsecretsProvider.GetCalls())
Click to show internal directories.
Click to hide internal directories.