mirror of https://github.com/docker/docs.git
Fix #2410
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net> Reviewed-by: David Gageot <david@gageot.net>
This commit is contained in:
parent
05c5ff5a16
commit
67b83f518f
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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" ]]
|
||||
}
|
Loading…
Reference in New Issue