Skip to content

Commit

Permalink
linitng
Browse files Browse the repository at this point in the history
Signed-off-by: reggie-k <[email protected]>
  • Loading branch information
reggie-k committed Jan 17, 2025
1 parent 92245f3 commit bc9c011
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions cmd/util/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ func TestValidateBearerTokenForHTTPSRepoOnly(t *testing.T) {
}

func runCmdAndCheckError(t *testing.T, expectError bool, testName, errorMsg string, validationFunc func()) {
t.Helper()
// All CLI commands do not return an error upon failure.
// Instead, the errors.CheckError(err) in each CLI command performs non-zero code system exit.
// So in order to test the commands, we need to run the command in a separate process and capture it's error message.
Expand Down
20 changes: 10 additions & 10 deletions server/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,11 @@ func (s *Server) ValidateAccess(ctx context.Context, q *repositorypkg.RepoAccess
}

repo := &v1alpha1.Repository{
Repo: q.Repo,
Type: q.Type,
Name: q.Name,
Username: q.Username,
Password: q.Password,
Repo: q.Repo,
Type: q.Type,
Name: q.Name,
Username: q.Username,
Password: q.Password,
BearerToken: q.BearerToken,
SSHPrivateKey: q.SshPrivateKey,
Insecure: q.Insecure,
Expand Down Expand Up @@ -714,11 +714,11 @@ func (s *Server) ValidateWriteAccess(ctx context.Context, q *repositorypkg.RepoA
}

repo := &v1alpha1.Repository{
Repo: q.Repo,
Type: q.Type,
Name: q.Name,
Username: q.Username,
Password: q.Password,
Repo: q.Repo,
Type: q.Type,
Name: q.Name,
Username: q.Username,
Password: q.Password,
BearerToken: q.BearerToken,
SSHPrivateKey: q.SshPrivateKey,
Insecure: q.Insecure,
Expand Down

0 comments on commit bc9c011

Please sign in to comment.