Merge pull request #228 from docker/compose_project_name

Changed compose flag —name to —project-name, -p, aligned with docker-compose flag.
This commit is contained in:
Djordje Lukic 2020-06-17 05:52:55 -07:00 committed by GitHub
commit 4232b66a6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -45,7 +45,7 @@ func downCommand() *cobra.Command {
return runDown(cmd.Context(), opts)
},
}
downCmd.Flags().StringVar(&opts.Name, "name", "", "Project name")
downCmd.Flags().StringVarP(&opts.Name, "project-name", "p", "", "Project name")
downCmd.Flags().StringVar(&opts.WorkDir, "workdir", ".", "Work dir")
downCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")

View File

@ -45,7 +45,7 @@ func upCommand() *cobra.Command {
return runUp(cmd.Context(), opts)
},
}
upCmd.Flags().StringVar(&opts.Name, "name", "", "Project name")
upCmd.Flags().StringVarP(&opts.Name, "project-name", "p", "", "Project name")
upCmd.Flags().StringVar(&opts.WorkDir, "workdir", ".", "Work dir")
upCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
upCmd.Flags().StringArrayVarP(&opts.Environment, "environment", "e", []string{}, "Environment variables")

View File

@ -123,7 +123,7 @@ func (s *E2eACISuite) TestACIBackend() {
})
It("deploys a compose app", func() {
s.NewDockerCommand("compose", "up", "-f", "../composefiles/aci-demo/aci_demo_port.yaml", "--name", "acidemo").ExecOrDie()
s.NewDockerCommand("compose", "up", "-f", "../composefiles/aci-demo/aci_demo_port.yaml", "--project-name", "acidemo").ExecOrDie()
// Expect(output).To(ContainSubstring("Successfully deployed"))
output := s.NewDockerCommand("ps").ExecOrDie()
Lines := Lines(output)
@ -155,7 +155,7 @@ func (s *E2eACISuite) TestACIBackend() {
})
It("shutdown compose app", func() {
s.NewDockerCommand("compose", "down", "-f", "../composefiles/aci-demo/aci_demo_port.yaml", "--name", "acidemo").ExecOrDie()
s.NewDockerCommand("compose", "down", "-f", "../composefiles/aci-demo/aci_demo_port.yaml", "--project-name", "acidemo").ExecOrDie()
})
It("switches back to default context", func() {
output := s.NewCommand("docker", "context", "use", "default").ExecOrDie()