Documentation
¶
Overview ¶
Package testutils is a generated GoMock package.
Index ¶
- Variables
- func ExpectAllParametersToBePut(client *MockSSMClient, path string, overwrite bool)
- func MockGetParametersByPath(client *MockSSMClient, path string, params []*ssm.Parameter)
- func ParametersSlice(prefix string) []*ssm.Parameter
- func Setup(t *testing.T)
- func Teardown()
- type MockSSMClient
- type MockSSMClientMockRecorder
- type MockService
- type MockServiceMockRecorder
Constants ¶
This section is empty.
Variables ¶
var ( // MockController is a gomock controller MockController *gomock.Controller // ParametersMap is a map of key-value pairs to represent parameters ParametersMap = map[string]string{ "foo": "<value-to-be-quoted>", "bar": "contains a single quote y'all", "baz": "uses multiple* special &characters, y'all", } )
Functions ¶
func ExpectAllParametersToBePut ¶
func ExpectAllParametersToBePut(client *MockSSMClient, path string, overwrite bool)
ExpectAllParametersToBePut mocks out the PutParameters function on the mock client for all parameters within ParametersMap
func MockGetParametersByPath ¶
func MockGetParametersByPath(client *MockSSMClient, path string, params []*ssm.Parameter)
MockGetParametersByPath mocks out the GetParametersByPath function on the mock client If params is nil, the ParametersSlice will be called passing in path to create the params slice
func ParametersSlice ¶
ParametersSlice converts the ParametersMap into a slice of ssm Parameters
Types ¶
type MockSSMClient ¶
type MockSSMClient struct {
// contains filtered or unexported fields
}
MockSSMClient is a mock of SSMClient interface.
func NewMockSSMClient ¶
func NewMockSSMClient(ctrl *gomock.Controller) *MockSSMClient
NewMockSSMClient creates a new mock instance.
func (*MockSSMClient) EXPECT ¶
func (m *MockSSMClient) EXPECT() *MockSSMClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSSMClient) GetParametersByPathPages ¶
func (m *MockSSMClient) GetParametersByPathPages(getParametersByPathInput *ssm.GetParametersByPathInput, fn func(*ssm.GetParametersByPathOutput, bool) bool) error
GetParametersByPathPages mocks base method.
func (*MockSSMClient) PutParameter ¶
func (m *MockSSMClient) PutParameter(input *ssm.PutParameterInput) (*ssm.PutParameterOutput, error)
PutParameter mocks base method.
type MockSSMClientMockRecorder ¶
type MockSSMClientMockRecorder struct {
// contains filtered or unexported fields
}
MockSSMClientMockRecorder is the mock recorder for MockSSMClient.
func (*MockSSMClientMockRecorder) GetParametersByPathPages ¶
func (mr *MockSSMClientMockRecorder) GetParametersByPathPages(getParametersByPathInput, fn interface{}) *gomock.Call
GetParametersByPathPages indicates an expected call of GetParametersByPathPages.
func (*MockSSMClientMockRecorder) PutParameter ¶
func (mr *MockSSMClientMockRecorder) PutParameter(input interface{}) *gomock.Call
PutParameter indicates an expected call of PutParameter.
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface.
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) GetParameters ¶
func (m *MockService) GetParameters(searchPath string) (map[string]string, error)
GetParameters mocks base method.
func (*MockService) PutParameters ¶
PutParameters mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) GetParameters ¶
func (mr *MockServiceMockRecorder) GetParameters(searchPath interface{}) *gomock.Call
GetParameters indicates an expected call of GetParameters.
func (*MockServiceMockRecorder) PutParameters ¶
func (mr *MockServiceMockRecorder) PutParameters(path, params, overwrite interface{}) *gomock.Call
PutParameters indicates an expected call of PutParameters.