From 9da78abb0c8eb54aeee7c3f67717050b8988f555 Mon Sep 17 00:00:00 2001 From: reggie-k Date: Sun, 12 Jan 2025 18:14:40 +0200 Subject: [PATCH] lint fixes Signed-off-by: reggie-k --- cmd/argocd/commands/repocreds.go | 1 - util/git/client_test.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/argocd/commands/repocreds.go b/cmd/argocd/commands/repocreds.go index b0616acaaad1d..9a854eae603cb 100644 --- a/cmd/argocd/commands/repocreds.go +++ b/cmd/argocd/commands/repocreds.go @@ -162,7 +162,6 @@ func NewRepoCredsAddCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comma // Specifying bearerToken is only valid for HTTPS repositories if repo.BearerToken != "" { if !git.IsHTTPSURL(repo.URL) { - err := stderrors.New("--bearer-token is only supported for HTTPS repositories") errors.CheckError(err) } diff --git a/util/git/client_test.go b/util/git/client_test.go index d17d73d81a8ce..a3f2d659ae5f9 100644 --- a/util/git/client_test.go +++ b/util/git/client_test.go @@ -838,6 +838,7 @@ func Test_nativeGitClient_CommitAndPush(t *testing.T) { actualCommitHash := strings.TrimSpace(string(gitCurrentCommitHash)) require.Equal(t, expectedCommitHash, actualCommitHash) } + func TestNewAuth(t *testing.T) { tests := []struct { name string @@ -846,7 +847,6 @@ func TestNewAuth(t *testing.T) { expected transport.AuthMethod wantErr bool }{ - { name: "HTTPSCreds with bearer token", repoURL: "https://github.com/org/repo.git",