Unexport container commands
This patch deprecates exported container commands and moves the implementation details to an unexported function. Commands that are affected include: - container.NewRunCommand - container.NewExecCommand - container.NewPsCommand - container.NewContainerCommand - container.NewAttachCommand - container.NewCommitCommand - container.NewCopyCommand - container.NewCreateCommand - container.NewDiffCommand - container.NewExportCommand - container.NewKillCommand - container.NewLogsCommand - container.NewPauseCommand - container.NewPortCommand - container.NewRenameCommand - container.NewRestartCommand - container.NewRmCommand - container.NewStartCommand - container.NewStatsCommand - container.NewStopCommand - container.NewTopCommand - container.NewUnpauseCommand - container.NewUpdateCommand - container.NewWaitCommand - container.NewPruneCommand Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
This commit is contained in:
@ -19,7 +19,7 @@ func TestContainerExportOutputToFile(t *testing.T) {
|
||||
return io.NopCloser(strings.NewReader("bar")), nil
|
||||
},
|
||||
})
|
||||
cmd := NewExportCommand(cli)
|
||||
cmd := newExportCommand(cli)
|
||||
cmd.SetOut(io.Discard)
|
||||
cmd.SetArgs([]string{"-o", dir.Join("foo"), "container"})
|
||||
assert.NilError(t, cmd.Execute())
|
||||
@ -37,7 +37,7 @@ func TestContainerExportOutputToIrregularFile(t *testing.T) {
|
||||
return io.NopCloser(strings.NewReader("foo")), nil
|
||||
},
|
||||
})
|
||||
cmd := NewExportCommand(cli)
|
||||
cmd := newExportCommand(cli)
|
||||
cmd.SetOut(io.Discard)
|
||||
cmd.SetErr(io.Discard)
|
||||
cmd.SetArgs([]string{"-o", "/dev/random", "container"})
|
||||
|
||||
Reference in New Issue
Block a user