From 2c639e549cc174f4530e48e639a249988686258e Mon Sep 17 00:00:00 2001 From: miryamfoiferCX Date: Thu, 14 Nov 2024 08:47:45 +0200 Subject: [PATCH] fixes for linter --- internal/commands/util/pr_test.go | 6 ++++-- internal/wrappers/pr-http.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/commands/util/pr_test.go b/internal/commands/util/pr_test.go index 81bcb6ab8..98f5bc7ce 100644 --- a/internal/commands/util/pr_test.go +++ b/internal/commands/util/pr_test.go @@ -8,6 +8,10 @@ import ( "gotest.tools/assert" ) +const ( + token = "token" +) + func TestNewGithubPRDecorationCommandMustExist(t *testing.T) { cmd := PRDecorationGithub(nil, nil, nil) assert.Assert(t, cmd != nil, "PR decoration command must exist") @@ -87,7 +91,6 @@ func TestUpdateAPIURLForAzureOnPrem_whenAPIURLIsNotSet_ShouldReturnCloudAPIURL(t } func TestUpdateScmTokenForAzureOnPrem_whenUserNameIsSet_ShouldUpdateToken(t *testing.T) { - token := "token" username := "username" expectedToken := username + ":" + token updatedToken := updateScmTokenForAzure(token, username) @@ -95,7 +98,6 @@ func TestUpdateScmTokenForAzureOnPrem_whenUserNameIsSet_ShouldUpdateToken(t *tes } func TestUpdateScmTokenForAzureOnPrem_whenUserNameNotSet_ShouldNotUpdateToken(t *testing.T) { - token := "token" username := "" expectedToken := token updatedToken := updateScmTokenForAzure(token, username) diff --git a/internal/wrappers/pr-http.go b/internal/wrappers/pr-http.go index 8a4362770..e114cea51 100644 --- a/internal/wrappers/pr-http.go +++ b/internal/wrappers/pr-http.go @@ -21,7 +21,7 @@ type PRHTTPWrapper struct { azurePath string } -func NewHTTPPRWrapper(githubPath, gitlabPath string, azurePath string) PRWrapper { +func NewHTTPPRWrapper(githubPath, gitlabPath, azurePath string) PRWrapper { return &PRHTTPWrapper{ githubPath: githubPath, gitlabPath: gitlabPath,