Documentation
¶
Index ¶
- Constants
- func DockerIncompatible(t testing.TB)
- func GetDaemonIsKillable() bool
- func GetTarget() string
- func M(m *testing.M)
- func RequireExecPlatform(t testing.TB, ss ...string)
- func RequiresBuild(t testing.TB)
- func WithStdin(r io.Reader) func(*Cmd)
- type Base
- func (b *Base) Cmd(args ...string) *Cmd
- func (b *Base) CmdWithHelper(helper []string, args ...string) *Cmd
- func (b *Base) ComposeCmd(args ...string) *Cmd
- func (b *Base) DumpDaemonLogs(minutes int)
- func (b *Base) EnsureDaemonActive()
- func (b *Base) Info() dockercompat.Info
- func (b *Base) InspectContainer(name string) dockercompat.Container
- func (b *Base) InspectImage(name string) dockercompat.Image
- func (b *Base) InspectNetwork(name string) dockercompat.Network
- func (b *Base) InspectVolume(name string) native.Volume
- func (b *Base) KillDaemon()
- type Cmd
- func (c *Cmd) Assert(expected icmd.Expected)
- func (c *Cmd) AssertExitCode(exitCode int)
- func (c *Cmd) AssertFail()
- func (c *Cmd) AssertNoOut(s string)
- func (c *Cmd) AssertOK()
- func (c *Cmd) AssertOutContains(s string)
- func (c *Cmd) AssertOutExactly(s string)
- func (c *Cmd) AssertOutWithFunc(fn func(stdout string) error)
- func (c *Cmd) CmdOption(cmdOptions ...func(*Cmd)) *Cmd
- func (c *Cmd) Out() string
- func (c *Cmd) OutLines() []string
- func (c *Cmd) Run() *icmd.Result
- type ComposeDir
- type Target
Constants ¶
View Source
const ( Nerdctl = Target("nerdctl") Docker = Target("docker") )
View Source
const ( WindowsNano = "gcr.io/k8s-staging-e2e-test-images/busybox:1.29-2" // CommonImage. // // More work needs to be done to support windows containers in test framework // for the tests that are run now this image (used in k8s upstream testing) meets the needs // use gcr.io/k8s-staging-e2e-test-images/busybox:1.29-2-windows-amd64-ltsc2022 locally on windows 11 // https://github.com/microsoft/Windows-Containers/issues/179 CommonImage = WindowsNano )
View Source
const Namespace = "nerdctl-test"
Variables ¶
This section is empty.
Functions ¶
func DockerIncompatible ¶
func GetDaemonIsKillable ¶
func GetDaemonIsKillable() bool
func RequireExecPlatform ¶ added in v0.13.0
func RequiresBuild ¶
Types ¶
type Base ¶
type Base struct { T testing.TB Target Target DaemonIsKillable bool Binary string ComposeBinary string // "docker-compose" Args []string Env []string }
func (*Base) ComposeCmd ¶ added in v0.8.0
ComposeCmd executes `nerdctl -n nerdctl-test compose` or `docker-compose`
func (*Base) DumpDaemonLogs ¶ added in v0.15.0
func (*Base) EnsureDaemonActive ¶
func (b *Base) EnsureDaemonActive()
func (*Base) Info ¶ added in v0.7.3
func (b *Base) Info() dockercompat.Info
func (*Base) InspectContainer ¶
func (b *Base) InspectContainer(name string) dockercompat.Container
func (*Base) InspectImage ¶ added in v0.9.0
func (b *Base) InspectImage(name string) dockercompat.Image
func (*Base) InspectNetwork ¶ added in v0.11.0
func (b *Base) InspectNetwork(name string) dockercompat.Network
func (*Base) InspectVolume ¶ added in v0.11.0
func (*Base) KillDaemon ¶
func (b *Base) KillDaemon()
type Cmd ¶
func (*Cmd) AssertExitCode ¶
func (*Cmd) AssertFail ¶
func (c *Cmd) AssertFail()
func (*Cmd) AssertNoOut ¶
func (*Cmd) AssertOutContains ¶ added in v0.8.1
func (*Cmd) AssertOutExactly ¶ added in v0.13.0
func (*Cmd) AssertOutWithFunc ¶
type ComposeDir ¶ added in v0.8.0
type ComposeDir struct {
// contains filtered or unexported fields
}
func NewComposeDir ¶ added in v0.8.0
func NewComposeDir(t testing.TB, dockerComposeYAML string) *ComposeDir
func (*ComposeDir) CleanUp ¶ added in v0.8.0
func (cd *ComposeDir) CleanUp()
func (*ComposeDir) ProjectName ¶ added in v0.8.0
func (cd *ComposeDir) ProjectName() string
func (*ComposeDir) WriteFile ¶ added in v0.8.0
func (cd *ComposeDir) WriteFile(name, content string)
func (*ComposeDir) YAMLFullPath ¶ added in v0.8.0
func (cd *ComposeDir) YAMLFullPath() string
Click to show internal directories.
Click to hide internal directories.