From 404f2629a337fe9c7d7450f284406f04275593e7 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Wed, 17 Jun 2020 07:17:58 +0200 Subject: [PATCH] =?UTF-8?q?Changed=20compose=20flag=20=E2=80=94name=20to?= =?UTF-8?q?=20=E2=80=94project-name,=20-p,=20aligned=20with=20docker-compo?= =?UTF-8?q?se=20flag.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli/cmd/compose/down.go | 2 +- cli/cmd/compose/up.go | 2 +- tests/aci-e2e/e2e-aci_test.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/cmd/compose/down.go b/cli/cmd/compose/down.go index 9de338048..dcfeca36f 100644 --- a/cli/cmd/compose/down.go +++ b/cli/cmd/compose/down.go @@ -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") diff --git a/cli/cmd/compose/up.go b/cli/cmd/compose/up.go index 78f66b0a7..88f45fd6a 100644 --- a/cli/cmd/compose/up.go +++ b/cli/cmd/compose/up.go @@ -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") diff --git a/tests/aci-e2e/e2e-aci_test.go b/tests/aci-e2e/e2e-aci_test.go index 67a64b4cf..0326fbaaf 100644 --- a/tests/aci-e2e/e2e-aci_test.go +++ b/tests/aci-e2e/e2e-aci_test.go @@ -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()