MCPcopy Index your code
hub / github.com/docker/cli / TestVersion

Function TestVersion

cmd/docker/docker_test.go:95–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestVersion(t *testing.T) {
96 var b bytes.Buffer
97 err := runCliCommand(t, nil, &b, "--version")
98 assert.NilError(t, err)
99 assert.Check(t, is.Contains(b.String(), "Docker version"))
100}
101
102func TestUserTerminatedError(t *testing.T) {
103 ctx, cancel := context.WithTimeoutCause(context.Background(), time.Second*1, errors.New("test timeout"))

Callers

nothing calls this directly

Calls 3

runCliCommandFunction · 0.85
ContainsMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…