mirror of https://github.com/docker/compose.git
e2e test running on windows, default endpoint is npipe on windows
This commit is contained in:
parent
38d4f8d25a
commit
4afdc69bb7
|
@ -19,6 +19,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
@ -207,11 +208,18 @@ func (s *E2eSuite) TestDisplayFriendlyErrorMessageForLegacyCommands() {
|
|||
func (s *E2eSuite) TestExecMobyIfUsingHostFlag() {
|
||||
s.NewDockerCommand("context", "create", "example", "test-example").ExecOrDie()
|
||||
s.NewDockerCommand("context", "use", "test-example").ExecOrDie()
|
||||
output, err := s.NewDockerCommand("-H", "unix:///var/run/docker.sock", "ps").Exec()
|
||||
output, err := s.NewDockerCommand("-H", defaultEndpoint(), "ps").Exec()
|
||||
Expect(err).To(BeNil())
|
||||
Expect(output).To(ContainSubstring("CONTAINER ID"))
|
||||
}
|
||||
|
||||
func defaultEndpoint() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
return "npipe:////./pipe/docker_engine"
|
||||
}
|
||||
return "unix:///var/run/docker.sock"
|
||||
}
|
||||
|
||||
func (s *E2eSuite) TestDisplaysAdditionalLineInDockerVersion() {
|
||||
output := s.NewDockerCommand("version").ExecOrDie()
|
||||
Expect(output).To(ContainSubstring("Azure integration"))
|
||||
|
|
Loading…
Reference in New Issue