Documentation
¶
Index ¶
- type SecretHandlerInterfaceMock
- func (mock *SecretHandlerInterfaceMock) CreateSecret(secret models.Secret) (string, *models.Error)
- func (mock *SecretHandlerInterfaceMock) CreateSecretCalls() []struct{ ... }
- func (mock *SecretHandlerInterfaceMock) DeleteSecret(secretName string, secretScope string) (string, *models.Error)
- func (mock *SecretHandlerInterfaceMock) DeleteSecretCalls() []struct{ ... }
- func (mock *SecretHandlerInterfaceMock) UpdateSecret(secret models.Secret) (string, *models.Error)
- func (mock *SecretHandlerInterfaceMock) UpdateSecretCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecretHandlerInterfaceMock ¶
type SecretHandlerInterfaceMock struct {
// CreateSecretFunc mocks the CreateSecret method.
CreateSecretFunc func(secret models.Secret) (string, *models.Error)
// DeleteSecretFunc mocks the DeleteSecret method.
DeleteSecretFunc func(secretName string, secretScope string) (string, *models.Error)
// UpdateSecretFunc mocks the UpdateSecret method.
UpdateSecretFunc func(secret models.Secret) (string, *models.Error)
// contains filtered or unexported fields
}
SecretHandlerInterfaceMock is a mock implementation of api.SecretHandlerInterface.
func TestSomethingThatUsesSecretHandlerInterface(t *testing.T) {
// make and configure a mocked api.SecretHandlerInterface
mockedSecretHandlerInterface := &SecretHandlerInterfaceMock{
CreateSecretFunc: func(secret models.Secret) (string, *models.Error) {
panic("mock out the CreateSecret method")
},
DeleteSecretFunc: func(secretName string, secretScope string) (string, *models.Error) {
panic("mock out the DeleteSecret method")
},
UpdateSecretFunc: func(secret models.Secret) (string, *models.Error) {
panic("mock out the UpdateSecret method")
},
}
// use mockedSecretHandlerInterface in code that requires api.SecretHandlerInterface
// and then make assertions.
}
func (*SecretHandlerInterfaceMock) CreateSecret ¶
CreateSecret calls CreateSecretFunc.
func (*SecretHandlerInterfaceMock) CreateSecretCalls ¶
func (mock *SecretHandlerInterfaceMock) CreateSecretCalls() []struct { Secret models.Secret }
CreateSecretCalls gets all the calls that were made to CreateSecret. Check the length with:
len(mockedSecretHandlerInterface.CreateSecretCalls())
func (*SecretHandlerInterfaceMock) DeleteSecret ¶
func (mock *SecretHandlerInterfaceMock) DeleteSecret(secretName string, secretScope string) (string, *models.Error)
DeleteSecret calls DeleteSecretFunc.
func (*SecretHandlerInterfaceMock) DeleteSecretCalls ¶
func (mock *SecretHandlerInterfaceMock) DeleteSecretCalls() []struct { SecretName string SecretScope string }
DeleteSecretCalls gets all the calls that were made to DeleteSecret. Check the length with:
len(mockedSecretHandlerInterface.DeleteSecretCalls())
func (*SecretHandlerInterfaceMock) UpdateSecret ¶
UpdateSecret calls UpdateSecretFunc.
func (*SecretHandlerInterfaceMock) UpdateSecretCalls ¶
func (mock *SecretHandlerInterfaceMock) UpdateSecretCalls() []struct { Secret models.Secret }
UpdateSecretCalls gets all the calls that were made to UpdateSecret. Check the length with:
len(mockedSecretHandlerInterface.UpdateSecretCalls())
Click to show internal directories.
Click to hide internal directories.