Skip to content

Commit

Permalink
code clean for repository (#6768)
Browse files Browse the repository at this point in the history
Signed-off-by: yanggang <[email protected]>
  • Loading branch information
Yang Gang (成都) authored and reasonerjt committed Sep 28, 2023
1 parent e4c2b2b commit 4929729
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/repository/backup_repo_op.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ func NewBackupRepository(namespace string, key BackupRepositoryKey) *velerov1api
}

func isBackupRepositoryNotFoundError(err error) bool {
return (err == errBackupRepoNotFound)
return err == errBackupRepoNotFound
}

func isBackupRepositoryNotProvisionedError(err error) bool {
return (err == errBackupRepoNotProvisioned)
return err == errBackupRepoNotProvisioned
}
2 changes: 1 addition & 1 deletion pkg/repository/config/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func GetS3Credentials(config map[string]string) (*credentials.Value, error) {
opts := session.Options{}
credentialsFile := config[CredentialsFileKey]
if credentialsFile == "" {
credentialsFile = os.Getenv("AWS_SHARED_CREDENTIALS_FILE")
credentialsFile = os.Getenv(awsCredentialsFileEnvVar)
}
if credentialsFile != "" {
opts.SharedConfigFiles = append(opts.SharedConfigFiles, credentialsFile)
Expand Down
2 changes: 1 addition & 1 deletion pkg/repository/config/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ func GetGCPCredentials(config map[string]string) string {
if credentialsFile, ok := config[CredentialsFileKey]; ok {
return credentialsFile
}
return os.Getenv("GOOGLE_APPLICATION_CREDENTIALS")
return os.Getenv(gcpCredentialsFileEnvVar)

Check warning on line 45 in pkg/repository/config/gcp.go

View check run for this annotation

Codecov / codecov/patch

pkg/repository/config/gcp.go#L45

Added line #L45 was not covered by tests
}

0 comments on commit 4929729

Please sign in to comment.