diff --git a/azure/backend.go b/azure/backend.go index 5d1f9213d..6bb9f9200 100644 --- a/azure/backend.go +++ b/azure/backend.go @@ -319,9 +319,16 @@ func (cs *aciComposeService) Up(ctx context.Context, opts cli.ProjectOptions) er } func (cs *aciComposeService) Down(ctx context.Context, opts cli.ProjectOptions) error { - project, err := cli.ProjectFromOptions(&opts) - if err != nil { - return err + var project types.Project + + if opts.Name != "" { + project = types.Project{Name:opts.Name} + } else { + fullProject, err := cli.ProjectFromOptions(&opts) + if err != nil { + return err + } + project = *fullProject } logrus.Debugf("Down on project with name %q\n", project.Name) diff --git a/tests/aci-e2e/e2e-aci_test.go b/tests/aci-e2e/e2e-aci_test.go index e09ff74c6..41687fbb6 100644 --- a/tests/aci-e2e/e2e-aci_test.go +++ b/tests/aci-e2e/e2e-aci_test.go @@ -297,7 +297,7 @@ func (s *E2eACISuite) TestACIBackend() { }) s.T().Run("shutdown compose app", func(t *testing.T) { - s.NewDockerCommand("compose", "down", "-f", composeFile, "--project-name", "acidemo").ExecOrDie() + s.NewDockerCommand("compose", "down", "--project-name", "acidemo").ExecOrDie() }) s.T().Run("switches back to default context", func(t *testing.T) {