Documentation
¶
Overview ¶
Package testutil contains common testing tasks like running dockerd.
Index ¶
- Variables
- func CheckNotParallel(t testing.TB)
- func CleanupContext(t *testing.T)
- func ConfigureTracing() func(context.Context)
- func GetContext(t TestingT) context.Context
- func RandomAlpha(n int) string
- func RunCommand(ctx context.Context, cmd string, args ...string) *icmd.Result
- func SetContext(t TestingT, ctx context.Context)
- func StartSpan(ctx context.Context, t TestingT) context.Context
- func TempDir(t *testing.T) string
- func UncompressedTarDigest(compressedTar io.Reader) (digest.Digest, error)
- type HelperT
- type Logger
- type TestingT
Constants ¶
This section is empty.
Variables ¶
var DevZero io.Reader = devZero{}
DevZero acts like /dev/zero but in an OS-independent fashion.
Functions ¶
func CheckNotParallel ¶
CheckNotParallel checks if t.Parallel() was not called on the current test. There's no public method to check this, so we use reflection to check the internal field set by t.Parallel() https://github.com/golang/go/blob/8e658eee9c7a67a8a79a8308695920ac9917566c/src/testing/testing.go#L1449
Since this is not a public API, it might change at any time.
func CleanupContext ¶
func ConfigureTracing ¶
ConfigureTracing sets up an OTLP tracing exporter for use in tests.
func GetContext ¶
func RandomAlpha ¶
RandomAlpha generates a lowercase alphabetical random string with length n.
func SetContext ¶
Types ¶
type HelperT ¶
type HelperT interface {
Helper()
}
HelperT is a subset of testing.T that implements the Helper function
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package daemon launches dockerd for testing purposes.
|
Package daemon launches dockerd for testing purposes. |
|
fixtures
|
|
|
plugin/basic
command
|
|