Skip to content

Commit

Permalink
fixes for linter
Browse files Browse the repository at this point in the history
  • Loading branch information
miryamfoiferCX committed Nov 14, 2024
1 parent dcfdddf commit 2c639e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions internal/commands/util/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -87,15 +91,13 @@ func TestUpdateAPIURLForAzureOnPrem_whenAPIURLIsNotSet_ShouldReturnCloudAPIURL(t
}

func TestUpdateScmTokenForAzureOnPrem_whenUserNameIsSet_ShouldUpdateToken(t *testing.T) {
token := "token"
username := "username"
expectedToken := username + ":" + token
updatedToken := updateScmTokenForAzure(token, username)
asserts.Equal(t, expectedToken, updatedToken)
}

func TestUpdateScmTokenForAzureOnPrem_whenUserNameNotSet_ShouldNotUpdateToken(t *testing.T) {
token := "token"
username := ""
expectedToken := token
updatedToken := updateScmTokenForAzure(token, username)
Expand Down
2 changes: 1 addition & 1 deletion internal/wrappers/pr-http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2c639e5

Please sign in to comment.