helper

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RED   = "\033[31m"
	RESET = "\033[0m"
)

Variables

View Source
var (
	// Glooctl points to the newly created binary
	Glooctl string
)

Functions

func BootstrapOpts

func BootstrapOpts() *bootstrap.Options

BootstrapOpts returns the options used to represent the storage used

func Build

func Build()

Build - builds the glooctl binary for testing

func CleanUp

func CleanUp()

CleanUp - cleans any binaries created for test

func ExpectOutput

func ExpectOutput(buf *bufio.Reader, expected string)

ExpectOutput compares the output of the interaction with expected Taken from generated code from autoplay

func SetupStorage

func SetupStorage()

SetupStorage sets up file based storage for testing glooctl

func TearDownStorage

func TearDownStorage()

TearDownStorage - cleans up file based storage used for testing

Types

type Args

type Args struct {
	Opts []string
}

func RunWithArgs

func RunWithArgs(opts ...string) *Args

RunWithArgs setups glooctl to run with given CLI parameters

func (*Args) ExpectExitCode

func (a *Args) ExpectExitCode(code int)

ExpectExitCode runs glooctl and expects the given exit code

func (*Args) ExpectExitCodeAndOutput

func (a *Args) ExpectExitCodeAndOutput(code int, messages ...string)

ExpectExitCodeAndOutput runs glooctl and expects the given exit code and output message

func (*Args) Interact

func (a *Args) Interact(code int, interaction func(*bufio.Reader, *os.File))

Jump to

Keyboard shortcuts

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