mirror of https://github.com/docker/compose.git
Merge pull request #354 from docker/aci_fix_compose_working_dir
Fix `docker compose up` with default project name being derived from current working dir
This commit is contained in:
commit
d7f8724dba
2
go.mod
2
go.mod
|
@ -16,7 +16,7 @@ require (
|
|||
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5
|
||||
github.com/Microsoft/hcsshim v0.8.9 // indirect
|
||||
github.com/buger/goterm v0.0.0-20200322175922-2f3e71b85129
|
||||
github.com/compose-spec/compose-go v0.0.0-20200629133725-59b25574fd55
|
||||
github.com/compose-spec/compose-go v0.0.0-20200706135920-95edc5378384
|
||||
github.com/containerd/console v1.0.0
|
||||
github.com/containerd/containerd v1.3.5 // indirect
|
||||
github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb // indirect
|
||||
|
|
6
go.sum
6
go.sum
|
@ -6,8 +6,6 @@ github.com/Azure/azure-pipeline-go v0.2.1 h1:OLBdZJ3yvOn2MezlWvbrBMTEUQC72zAftRZ
|
|||
github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
|
||||
github.com/Azure/azure-sdk-for-go v43.3.0+incompatible h1:o0G4JAsOzeVJEwU0Ud9bh+lUHPUc0GkFENJ02dk51Uo=
|
||||
github.com/Azure/azure-sdk-for-go v43.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
|
||||
github.com/Azure/azure-storage-file-go v0.7.0 h1:yWoV0MYwzmoSgWACcVkdPolvAULFPNamcQLpIvS/Et4=
|
||||
github.com/Azure/azure-storage-file-go v0.7.0/go.mod h1:3w3mufGcMjcOJ3w+4Gs+5wsSgkT7xDwWWqMMIrXtW4c=
|
||||
github.com/Azure/azure-storage-file-go v0.8.0 h1:OX8DGsleWLUE6Mw4R/OeWEZMvsTIpwN94J59zqKQnTI=
|
||||
github.com/Azure/azure-storage-file-go v0.8.0/go.mod h1:3w3mufGcMjcOJ3w+4Gs+5wsSgkT7xDwWWqMMIrXtW4c=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
|
||||
|
@ -63,8 +61,8 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
|||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/compose-spec/compose-go v0.0.0-20200629133725-59b25574fd55 h1:vX1uiHKgVnFBPBLxz6P28n+TKGt3jGThvDr2vkSP8D0=
|
||||
github.com/compose-spec/compose-go v0.0.0-20200629133725-59b25574fd55/go.mod h1:ArodJ6gsEB7iWKrbV3fSHZ08LlBvSVB0Oqg04fX86t4=
|
||||
github.com/compose-spec/compose-go v0.0.0-20200706135920-95edc5378384 h1:YSqZ36juhi7csACxOOO5CGr7ILES5AbLbTj6J9WAxlg=
|
||||
github.com/compose-spec/compose-go v0.0.0-20200706135920-95edc5378384/go.mod h1:ArodJ6gsEB7iWKrbV3fSHZ08LlBvSVB0Oqg04fX86t4=
|
||||
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s=
|
||||
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
|
||||
github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
|
||||
|
|
|
@ -226,11 +226,13 @@ func (s *E2eACISuite) TestACIBackend() {
|
|||
var exposedURL string
|
||||
const composeFile = "../composefiles/aci-demo/aci_demo_port.yaml"
|
||||
const composeFileMultiplePorts = "../composefiles/aci-demo/aci_demo_multi_port.yaml"
|
||||
const serverContainer = "acidemo_web"
|
||||
const wordsContainer = "acidemo_words"
|
||||
const composeProjectName = "acie2e"
|
||||
const serverContainer = composeProjectName + "_web"
|
||||
const wordsContainer = composeProjectName + "_words"
|
||||
|
||||
s.T().Run("deploys a compose app", func(t *testing.T) {
|
||||
s.NewDockerCommand("compose", "up", "-f", composeFile, "--project-name", "acidemo").ExecOrDie()
|
||||
// specifically do not specify project name here, it will be derived from current folder "acie2e"
|
||||
s.NewDockerCommand("compose", "up", "-f", composeFile).ExecOrDie()
|
||||
output := s.NewDockerCommand("ps").ExecOrDie()
|
||||
Lines := Lines(output)
|
||||
Expect(len(Lines)).To(Equal(4))
|
||||
|
@ -261,7 +263,7 @@ func (s *E2eACISuite) TestACIBackend() {
|
|||
})
|
||||
|
||||
s.T().Run("updates a compose app", func(t *testing.T) {
|
||||
s.NewDockerCommand("compose", "up", "-f", composeFileMultiplePorts, "--project-name", "acidemo").ExecOrDie()
|
||||
s.NewDockerCommand("compose", "up", "-f", composeFileMultiplePorts, "--project-name", composeProjectName).ExecOrDie()
|
||||
// Expect(output).To(ContainSubstring("Successfully deployed"))
|
||||
output := s.NewDockerCommand("ps").ExecOrDie()
|
||||
Lines := Lines(output)
|
||||
|
@ -297,7 +299,7 @@ func (s *E2eACISuite) TestACIBackend() {
|
|||
})
|
||||
|
||||
s.T().Run("shutdown compose app", func(t *testing.T) {
|
||||
s.NewDockerCommand("compose", "down", "--project-name", "acidemo").ExecOrDie()
|
||||
s.NewDockerCommand("compose", "down", "--project-name", composeProjectName).ExecOrDie()
|
||||
})
|
||||
|
||||
s.T().Run("switches back to default context", func(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue