util

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultVMImage = "weaveworks/ignite-ubuntu"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	T   *testing.T
	Cmd *exec.Cmd
	// contains filtered or unexported fields
}

Command is an ignite command execution helper. It takes a binary and the arguments to run with the binary. It provides a chaining methods to fascilitate easy construction of the command.

func NewCommand

func NewCommand(t *testing.T, binPath string) *Command

NewCommand takes a go test testing.T and path to ignite binary and returns an initialized Command.

func (*Command) Dir

func (c *Command) Dir(path string) *Command

Dir sets the command execution directory.

func (*Command) New

func (c *Command) New() *Command

New resets the command. This should be used to reuse an existing Command and pass different arguments by method chaining.

func (*Command) Run

func (c *Command) Run()

Run executes the command and performs an error check. It results in fatal exit of the test if an error is encountered. In order to continue the test on encountering an error, call Command.Cmd.CombinedOutput() or the appropriate method to execute the command separately.

func (*Command) With

func (c *Command) With(args ...string) *Command

With accepts arguments to be used with the command. It returns Command and supports method chaining.

func (*Command) WithNetwork

func (c *Command) WithNetwork(arg string) *Command

WithNetwork sets the network argument.

func (*Command) WithRuntime

func (c *Command) WithRuntime(arg string) *Command

WithRuntime sets the runtime argument.

Jump to

Keyboard shortcuts

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