Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerExecution ¶
type ContainerExecution struct { Cmd []string Parameters *ansible.ContainerParameters }
ContainerExecution is a helper for holding together executed Command and container parameters within single StartExecuteAndRemove execution.
func (*ContainerExecution) String ¶
func (c *ContainerExecution) String() string
type MockContainerExecutor ¶
type MockContainerExecutor struct {
// contains filtered or unexported fields
}
MockContainerExecutor collects all executions that were called via Container Executor.
func NewMockContainerExecutor ¶
func NewMockContainerExecutor(t *testing.T) *MockContainerExecutor
NewMockContainerExecutor returns new testing container executor.
func (*MockContainerExecutor) AssertAndClear ¶
func (m *MockContainerExecutor) AssertAndClear(expectedExecutions []ContainerExecution)
AssertAndClear compares executed commands and parameters with expected executions and clears previously executed commands and parameters to start over.
func (*MockContainerExecutor) StartExecuteAndRemove ¶
func (m *MockContainerExecutor) StartExecuteAndRemove( ctx context.Context, cp *ansible.ContainerParameters, cmd []string, ) error
StartExecuteAndRemove is a mocked method which saves executed command and parameters for future assertions.
Click to show internal directories.
Click to hide internal directories.