From eed4dab1468fdf138119e3897764f22f6f222a01 Mon Sep 17 00:00:00 2001 From: rhodesp Date: Thu, 16 Jan 2025 14:14:35 +0000 Subject: [PATCH] Removed unused parameters --- pkg/application/create_test.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pkg/application/create_test.go b/pkg/application/create_test.go index a02de5d..a6caf95 100644 --- a/pkg/application/create_test.go +++ b/pkg/application/create_test.go @@ -28,9 +28,7 @@ var _ = Describe("Create new application", func() { var ( cplatformServerRepo *gittest.BareRepository - cplatformLocalRepo *git.LocalRepository templatesServerRepo *gittest.BareRepository - templatesLocalRepo *git.LocalRepository newAppServerRepo *gittest.BareRepository newRepoId int64 @@ -57,15 +55,14 @@ var _ = Describe("Create new application", func() { var err error _, err = gittest.CreateTestCorectlConfig(t.TempDir()) assert.NoError(t, err) - cplatformServerRepo, cplatformLocalRepo, err = gittest.CreateBareAndLocalRepoFromDir(&gittest.CreateBareAndLocalRepoOp{ + cplatformServerRepo, _, err = gittest.CreateBareAndLocalRepoFromDir(&gittest.CreateBareAndLocalRepoOp{ SourceDir: testdata.CPlatformEnvsPath(), TargetBareRepoDir: t.TempDir(), TargetLocalRepoDir: config.GetCorectlCPlatformDir(), }) - _ = cplatformLocalRepo Expect(err).NotTo(HaveOccurred()) - templatesServerRepo, templatesLocalRepo, err = gittest.CreateBareAndLocalRepoFromDir(&gittest.CreateBareAndLocalRepoOp{ + templatesServerRepo, _, err = gittest.CreateBareAndLocalRepoFromDir(&gittest.CreateBareAndLocalRepoOp{ SourceDir: testdata.TemplatesPath(), TargetBareRepoDir: t.TempDir(), TargetLocalRepoDir: config.GetCorectlTemplatesDir(), @@ -138,7 +135,7 @@ var _ = Describe("Create new application", func() { Renderer: &render.FlagsAwareTemplateRenderer{}, } service = NewService(renderer, githubClient, false) - templateToUse, err := template.FindByName(templatesLocalRepo.Path(), testdata.BlankTemplate()) + templateToUse, err := template.FindByName(config.GetCorectlTemplatesDir(), testdata.BlankTemplate()) Expect(err).NotTo(HaveOccurred()) localAppRepoDir = t.TempDir() @@ -353,7 +350,7 @@ var _ = Describe("Create new application", func() { }) Expect(err).NotTo(HaveOccurred()) - templateToUse, err := template.FindByName(templatesLocalRepo.Path(), testdata.BlankTemplate()) + templateToUse, err := template.FindByName(config.GetCorectlTemplatesDir(), testdata.BlankTemplate()) Expect(err).NotTo(HaveOccurred()) Expect(templateToUse).NotTo(BeNil()) @@ -512,7 +509,7 @@ var _ = Describe("Create new application", func() { }) Expect(err).NotTo(HaveOccurred()) - templateToUse, _ := template.FindByName(templatesLocalRepo.Path(), testdata.BlankTemplate()) + templateToUse, _ := template.FindByName(config.GetCorectlTemplatesDir(), testdata.BlankTemplate()) monorepoLocalPath = monorepoLocalRepo.Path() newAppLocalPath = filepath.Join(monorepoLocalRepo.Path(), "app-with-error")