MCPcopy Index your code
hub / github.com/docker/docker-agent / TestGettingStarted_RegisteredOnRoot

Function TestGettingStarted_RegisteredOnRoot

cmd/root/getting_started_test.go:33–45  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func TestGettingStarted_RegisteredOnRoot(t *testing.T) {
34 t.Parallel()
35
36 cmd, _, err := NewRootCmd().Find([]string{"getting-started"})
37 require.NoError(t, err)
38 assert.Equal(t, "getting-started", cmd.Name())
39 assert.Contains(t, cmd.Aliases, "tour")
40
41 // The alias resolves to the same command.
42 viaAlias, _, err := NewRootCmd().Find([]string{"tour"})
43 require.NoError(t, err)
44 assert.Equal(t, "getting-started", viaAlias.Name())
45}

Callers

nothing calls this directly

Calls 3

NewRootCmdFunction · 0.85
NameMethod · 0.65
FindMethod · 0.45

Tested by

no test coverage detected