Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Add test for 'docker-machine inspect'
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
  • Loading branch information
nathanleclaire committed Jan 18, 2016
1 parent d6e7d5b commit 8ea5300
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions commands/inspect_test.go
@@ -0,0 +1,31 @@
package commands

import (
"testing"

"github.com/docker/machine/commands/commandstest"
"github.com/docker/machine/libmachine"
"github.com/docker/machine/libmachine/libmachinetest"
"github.com/stretchr/testify/assert"
)

func TestCmdInspect(t *testing.T) {
testCases := []struct {
commandLine CommandLine
api libmachine.API
expectedErr error
}{
{
commandLine: &commandstest.FakeCommandLine{
CliArgs: []string{"foo", "bar"},
},
api: &libmachinetest.FakeAPI{},
expectedErr: ErrExpectedOneMachine,
},
}

for _, tc := range testCases {
err := cmdInspect(tc.commandLine, tc.api)
assert.Equal(t, tc.expectedErr, err)
}
}

0 comments on commit 8ea5300

Please sign in to comment.