Skip to content

Commit

Permalink
Improve repositores code
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <[email protected]>
  • Loading branch information
sverdlov93 committed Nov 6, 2024
1 parent cd0fda3 commit 547fa02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions artifactory/commands/buildtoollogin/buildtoollogin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ func TestBuildToolLoginCommand_configurePoetry(t *testing.T) {
poetryAuthContentBytes, err := os.ReadFile(poetryAuthFilePath)
assert.NoError(t, err)
poetryAuthContent := string(poetryAuthContentBytes)
// Normalize line endings for comparison.(For Windows)
poetryConfigContent = strings.ReplaceAll(poetryConfigContent, "\r\n", "\n")

Check failure on line 271 in artifactory/commands/buildtoollogin/buildtoollogin_test.go

View workflow job for this annotation

GitHub Actions / Static-Check

ineffectual assignment to poetryConfigContent (ineffassign)

if testCase.accessToken != "" {
// Validate token-based authentication (The token is stored in the keyring so we can't test it)
assert.Contains(t, poetryAuthContent, fmt.Sprintf("[http-basic.test-repo]\nusername = \"%s\"", auth.ExtractUsernameFromAccessToken(testCase.accessToken)))
Expand Down

0 comments on commit 547fa02

Please sign in to comment.