Documentation
¶
Overview ¶
Package testutil provides shared test helpers used across sind packages.
Index ¶
- func ArgValue(args []string, flag string) (string, bool)
- func ArgValues(args []string, flag string) []string
- func ExitCode1(t *testing.T) *exec.ExitError
- func NDJSON[T any](entries ...T) string
- func NewClient(t *testing.T) (*docker.Client, *mock.Recorder)
- func Pairs(s []string) iter.Seq2[string, string]
- func Ptr[T any](v T) *T
- func Realm(string) string
- func TarArchive(name, content string) string
- type PsEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExitCode1 ¶
ExitCode1 returns an *exec.ExitError with exit code 1. This is used to mock Docker inspect commands that return exit code 1 for missing resources.
func Realm ¶
Realm returns the default realm "sind" in unit mode. In integration mode it returns a unique random realm with the given prefix.
func TarArchive ¶
TarArchive builds a tar archive containing a single file with the given name and content.
Types ¶
Click to show internal directories.
Click to hide internal directories.