test

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: MIT Imports: 11 Imported by: 0

README

The test folder contains two things:

  • common.go - common code shared between the tests to avoid duplication.
  • the source code for mock/spy containers for testing - one for each of config, release and terraform in folders of the same name.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTerraformInitInitialReflectedInput

func CheckTerraformInitInitialReflectedInput(output []byte)

CheckTerraformInitInitialReflectedInput checks the debug output for the terraform init during release.

func CheckTerraformWorkspaceList

func CheckTerraformWorkspaceList(line string)

CheckTerraformWorkspaceList checks the debug output for the terraform list workspace command during workspace selection in deployment.

func CheckTerraformWorkspaceNew

func CheckTerraformWorkspaceNew(line, workspaceName string)

CheckTerraformWorkspaceNew checks the debug output for the terraform workspace new command during workspace selections in deployment.

func CreateVolume

func CreateVolume(dockerCient docker.Iface) string

func DumpLines added in v0.17.3

func DumpLines(lines []string) string

DumpLines outputs a set of lines with indentation.

func GetConfig

func GetConfig(name string) string

func GetDockerClient added in v0.17.0

func GetDockerClient() docker.Iface

GetDockerClient returns a docker client for testing.

func ReadVolume

func ReadVolume(dockerClient docker.Iface, volume string) (map[string]string, error)

func RemoveVolume

func RemoveVolume(dockerClient docker.Iface, volume string)

Types

type OutputCollector added in v0.17.3

type OutputCollector struct {
	OutputWriter io.WriteCloser
	ErrorWriter  io.WriteCloser
	// contains filtered or unexported fields
}

OutputCollector is an experimental alternative to bytes.Buffer for collecting output in order to track down bug.

func NewOutputCollector added in v0.17.3

func NewOutputCollector() *OutputCollector

NewOutputCollector returns a new output collector.

func (*OutputCollector) Collect added in v0.17.3

func (collector *OutputCollector) Collect() (string, string, error)

Collect returns the stdout & stderr output.

type ReflectedInput

type ReflectedInput struct {
	Args  []string
	Env   map[string]string
	Input string
	Cwd   string
	File  string
}

ReflectedInput is the message format returned from the fake terraform container that reflects its inputs.

Directories

Path Synopsis
config module

Jump to

Keyboard shortcuts

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