Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + const Prompt + var TestEnvSupportsNetAdmin = true + func BoolFromEnv(name string, def bool) bool + func ConfigureExePath() error + func Copy(src, dst string) error + func DurationFromEnv(name string, def time.Duration) time.Duration + func FindFile(path string) (string, error) + func ImageByName(name string) string + func IntFromEnv(name string, def int) int + func IsCheckpointSupported() bool + func IsRunningWithHostNet() bool + func IsRunningWithNetRaw() bool + func IsRunningWithOverlay() bool + func IsStatic(filename string) (bool, error) + func KillCommand(cmd *exec.Cmd) error + func NewSpecWithArgs(args ...string) *specs.Spec + func Poll(cb func() error, timeout time.Duration) error + func PollContext(ctx context.Context, cb func() error) error + func RandomContainerID() string + func RandomID(prefix string) string + func SetupBundleDir(spec *specs.Spec) (string, func(), error) + func SetupContainer(spec *specs.Spec, conf *config.Config) (rootDir, bundleDir string, cleanup func(), err error) + func SetupRootDir() (string, func(), error) + func StartReaper() func() + func StringFromEnv(name, def string) string + func TestConfig(t *testing.T) *config.Config + func TestIndicesForShard(numTests int) ([]int, error) + func TmpDir() string + func TouchShardStatusFile() error + func WaitForHTTP(ip string, port int, timeout time.Duration) error + func WaitUntilRead(r io.Reader, want string, timeout time.Duration) error + func WriteTmpFile(pattern, text string) (string, func(), error) + type Cmd struct + func Command(logger Logger, args ...string) *Cmd + func (c *Cmd) CombinedOutput() ([]byte, error) + type DefaultLogger string + func (d DefaultLogger) Logf(fmt string, args ...any) + func (d DefaultLogger) Name() string + type Logger interface + Logf func(fmt string, args ...any) + Name func() string + func NewMultiLogger(loggers ...Logger) Logger + type Reaper struct + func (r *Reaper) Start() + func (r *Reaper) Stop() + type Shell struct + func NewShell(ctx context.Context, logger Logger) (*Shell, func(), error) + func (s *Shell) Expect(ctx context.Context, want []byte) error + func (s *Shell) ExpectEmptyLine(ctx context.Context) error + func (s *Shell) ExpectLine(ctx context.Context, want string) error + func (s *Shell) ExpectPrompt(ctx context.Context) error + func (s *Shell) ExpectString(ctx context.Context, want string) error + func (s *Shell) GetCommandOutput(ctx context.Context) ([]byte, error) + func (s *Shell) ReadUntil(ctx context.Context, finalLine string) ([]byte, error) + func (s *Shell) RefreshSTTY(ctx context.Context, expectPrompt string) error + func (s *Shell) RunCommand(ctx context.Context, cmd ...string) ([]byte, error) + func (s *Shell) SendEOF(ctx context.Context, expectLinebreak bool) error + func (s *Shell) SendInterrupt(ctx context.Context, expectLinebreak bool) error + func (s *Shell) StartCommand(ctx context.Context, cmd ...string) error + func (s *Shell) Write(b []byte) error + func (s *Shell) WriteLine(ctx context.Context, line string) error + type Tree struct + func NewTree(testNames []string, separator string) *Tree + func (tree *Tree) Run(t *testing.T, fn func(t *testing.T, testName string)) + func (tree *Tree) RunParallel(t *testing.T, fn func(t *testing.T, testName string))