testutils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package testutils is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
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

func ParametersSlice(prefix string) []*ssm.Parameter

ParametersSlice converts the ParametersMap into a slice of ssm Parameters

func Setup

func Setup(t *testing.T)

Setup initializes the mock controller

func Teardown

func Teardown()

Teardown cleans up after gomock

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

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

func (m *MockService) PutParameters(path string, params map[string]string, overwrite bool) error

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.

Jump to

Keyboard shortcuts

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