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

Function TestPluginEnable

cli/command/plugin/enable_test.go:59–70  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

57}
58
59func TestPluginEnable(t *testing.T) {
60 cli := test.NewFakeCli(&fakeClient{
61 pluginEnableFunc: func(name string, options client.PluginEnableOptions) (client.PluginEnableResult, error) {
62 return client.PluginEnableResult{}, nil
63 },
64 })
65
66 cmd := newEnableCommand(cli)
67 cmd.SetArgs([]string{"plugin-foo"})
68 assert.NilError(t, cmd.Execute())
69 assert.Check(t, is.Equal("plugin-foo\n", cli.OutBuffer().String()))
70}

Callers

nothing calls this directly

Calls 4

OutBufferMethod · 0.95
newEnableCommandFunction · 0.85
SetArgsMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…