util

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func RmiCompletely added in v0.10.0

func RmiCompletely(img string, cmd *Command, rt runtime.Name)

rmiCompletely removes a given image completely, from ignite image store and runtime image store.

func RmiContainerd added in v0.10.0

func RmiContainerd(img string)

RmiContainerd removes an image from containerd content store.

func RmiDocker added in v0.10.0

func RmiDocker(img string)

RmiDocker removes an image from docker content store.

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 chaining methods to facilitate 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) PassThrough added in v0.9.0

func (c *Command) PassThrough() *Command

PassThrough makes output from the command go to the same place as this process.

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