mirror of https://github.com/docker/compose.git
update test
Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
parent
34df3caaaf
commit
fef479ad1f
|
@ -212,7 +212,7 @@ func main() {
|
|||
compose.Command(ctype),
|
||||
volume.Command(ctype),
|
||||
)
|
||||
if ctype == store.LocalContextType {
|
||||
if ctype == store.DefaultContextType || ctype == store.LocalContextType {
|
||||
if len(opts.Hosts) > 0 {
|
||||
opts.Context = ""
|
||||
currentContext = "default"
|
||||
|
|
|
@ -396,15 +396,14 @@ func TestLegacy(t *testing.T) {
|
|||
})
|
||||
|
||||
t.Run("host flag", func(t *testing.T) {
|
||||
stderr := "dial tcp: lookup nonexistent"
|
||||
if runtime.GOOS == "windows" {
|
||||
stderr = "dial tcp: lookup nonexistent: no such host"
|
||||
}
|
||||
stderr := []string{"dial tcp: lookup nonexistent", "no such host"}
|
||||
res := c.RunDockerOrExitError("-H", "tcp://nonexistent:123", "version")
|
||||
res.Assert(t, icmd.Expected{
|
||||
ExitCode: 1,
|
||||
})
|
||||
assert.Assert(t, strings.Contains(res.Stderr(), stderr), res.Stderr())
|
||||
for _, s := range stderr {
|
||||
assert.Assert(t, strings.Contains(res.Stderr(), s), res.Stderr())
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("existing contexts delegate", func(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue