Add some unit tests to the node and swarm cli code

Start work on adding unit tests to our cli code in order to have to
write less costly integration test.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2017-01-09 18:30:15 +01:00
parent 5d67ac20cb
commit ee8f9e084a
57 changed files with 2451 additions and 78 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ type removeOptions struct {
force bool
}
func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
func newRemoveCommand(dockerCli command.Cli) *cobra.Command {
opts := removeOptions{}
cmd := &cobra.Command{
@@ -33,7 +33,7 @@ func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
return cmd
}
func runRemove(dockerCli *command.DockerCli, args []string, opts removeOptions) error {
func runRemove(dockerCli command.Cli, args []string, opts removeOptions) error {
client := dockerCli.Client()
ctx := context.Background()