Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cherry-pick v1.12] code clean for repository (#6768) #6892

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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
}
Loading