mirror of https://github.com/docker/docs.git
Add test for 'docker-machine inspect'
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
parent
d6e7d5b966
commit
8ea5300b5a
|
@ -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)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue