package testutil
import "github.com/dotcloud/docker/testutil"
Package testutil contains common testing tasks like running dockerd.
Index ¶
- Variables
- func CleanupContext(t *testing.T)
- func ConfigureTracing() func(context.Context)
- func GenerateRandomAlphaOnlyString(n int) string
- func GetContext(t TestingT) context.Context
- 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
- type HelperT
- type TestingT
Variables ¶
DevZero acts like /dev/zero but in an OS-independent fashion.
Functions ¶
func CleanupContext ¶
func ConfigureTracing ¶
ConfigureTracing sets up an OTLP tracing exporter for use in tests.
func GenerateRandomAlphaOnlyString ¶
GenerateRandomAlphaOnlyString generates an alphabetical random string with length n.
func GetContext ¶
func RunCommand ¶
func SetContext ¶
func StartSpan ¶
StartSpan starts a span for the given test.
Types ¶
type HelperT ¶
type HelperT interface {
Helper()
}
HelperT is a subset of testing.T that implements the Helper function
type TestingT ¶
TestingT is an interface wrapper around *testing.T and *testing.B.
Source Files ¶
doc.go helper.go helpers.go stringutils.go
Directories ¶
Path | Synopsis |
---|---|
testutil/daemon | Package daemon launches dockerd for testing purposes. |
testutil/environment | |
testutil/fakecontext | |
testutil/fakegit | |
testutil/fakestorage | |
testutil/fixtures | |
testutil/fixtures/load | |
testutil/fixtures/plugin | |
testutil/fixtures/plugin/basic | |
testutil/registry | |
testutil/request |
- Version
- v25.0.0-rc.2+incompatible
- Published
- Jan 12, 2024
- Platform
- js/wasm
- Imports
- 17 packages
- Last checked
- 7 seconds ago –
Tools for package owners.