testutil

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Nerdctl = Target("nerdctl")
	Docker  = Target("docker")
)
View Source
const AlpineImage = "alpine"

TODO: avoid using Docker Hub

View Source
const Namespace = "nerdctl-test"

Variables

This section is empty.

Functions

func GetTarget

func GetTarget() string

func M

func M(m *testing.M)

Types

type Base

type Base struct {
	T      testing.TB
	Target Target
	Binary string
	Args   []string
}

func NewBase

func NewBase(t *testing.T) *Base

func (*Base) Cmd

func (b *Base) Cmd(args ...string) *Cmd

type Cmd

type Cmd struct {
	icmd.Cmd
	*Base
	DockerIncompatible bool
}

func (*Cmd) Assert

func (c *Cmd) Assert(expected icmd.Expected)

func (*Cmd) AssertOK

func (c *Cmd) AssertOK()

func (*Cmd) AssertOut

func (c *Cmd) AssertOut(s string)

func (*Cmd) AssertOutWithFunc

func (c *Cmd) AssertOutWithFunc(fn func(stdout string) error)

func (*Cmd) Run

func (c *Cmd) Run() *icmd.Result

type Target

type Target = string

Jump to

Keyboard shortcuts

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