mirror of
https://github.com/docker/compose.git
synced 2025-07-16 18:24:26 +02:00
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 (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -207,11 +208,18 @@ func (s *E2eSuite) TestDisplayFriendlyErrorMessageForLegacyCommands() {
|
|||||||
func (s *E2eSuite) TestExecMobyIfUsingHostFlag() {
|
func (s *E2eSuite) TestExecMobyIfUsingHostFlag() {
|
||||||
s.NewDockerCommand("context", "create", "example", "test-example").ExecOrDie()
|
s.NewDockerCommand("context", "create", "example", "test-example").ExecOrDie()
|
||||||
s.NewDockerCommand("context", "use", "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(err).To(BeNil())
|
||||||
Expect(output).To(ContainSubstring("CONTAINER ID"))
|
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() {
|
func (s *E2eSuite) TestDisplaysAdditionalLineInDockerVersion() {
|
||||||
output := s.NewDockerCommand("version").ExecOrDie()
|
output := s.NewDockerCommand("version").ExecOrDie()
|
||||||
Expect(output).To(ContainSubstring("Azure integration"))
|
Expect(output).To(ContainSubstring("Azure integration"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user