Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
Reviewed-by: David Gageot <david@gageot.net>
This commit is contained in:
Jean-Laurent de Morlhon 2015-11-25 18:27:35 +01:00
parent 05c5ff5a16
commit 67b83f518f
2 changed files with 12 additions and 0 deletions

View File

@ -3,6 +3,8 @@ package drivers
import (
"sync"
"encoding/json"
"github.com/docker/machine/libmachine/mcnflag"
"github.com/docker/machine/libmachine/state"
)
@ -164,3 +166,7 @@ func (d *SerialDriver) Stop() error {
defer d.Unlock()
return d.Driver.Stop()
}
func (d *SerialDriver) MarshalJSON() ([]byte, error) {
return json.Marshal(d.Driver)
}

View File

@ -21,3 +21,9 @@ load ${BASE_TEST_DIR}/helpers.bash
linecount=$(machine inspect -f '{{prettyjson .Driver}}' $NAME | wc -l)
[[ "$linecount" -gt 1 ]]
}
@test "$DRIVER: check .Driver output is not flawed" {
run docker-machine inspect -f '{{.Driver.SSHUser}}' $NAME
[ "$status" -eq 0 ]
[[ ${output} == "docker" ]]
}