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

Function TestRunLabel

cli/command/container/run_test.go:57–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

55}
56
57func TestRunLabel(t *testing.T) {
58 fakeCLI := test.NewFakeCli(&fakeClient{
59 createContainerFunc: func(options client.ContainerCreateOptions) (client.ContainerCreateResult, error) {
60 return client.ContainerCreateResult{ID: "id"}, nil
61 },
62 Version: client.MaxAPIVersion,
63 })
64 cmd := newRunCommand(fakeCLI)
65 cmd.SetArgs([]string{"--detach=true", "--label", "foo", "busybox"})
66 assert.NilError(t, cmd.Execute())
67}
68
69func TestRunAttach(t *testing.T) {
70 p, tty, err := pty.Open()

Callers

nothing calls this directly

Calls 2

newRunCommandFunction · 0.85
SetArgsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…