Skip to content

Commit

Permalink
Merge pull request #7591 from mmorel-35/noctx
Browse files Browse the repository at this point in the history
golangci-lint(noctx): fix test files
  • Loading branch information
danfengliu committed May 13, 2024
2 parents 1ca1178 + 173f704 commit 3c37c84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion .golangci.yaml
Expand Up @@ -359,7 +359,6 @@ issues:
- gosec
- gosimple
- nilerr
- noctx
- staticcheck
- stylecheck
- unconvert
Expand Down
4 changes: 3 additions & 1 deletion test/util/velero/velero_utils.go
Expand Up @@ -907,7 +907,9 @@ func getVeleroCliTarball(cliTarballUrl string) (*os.File, error) {
lastInd := strings.LastIndex(cliTarballUrl, "/")
tarball := cliTarballUrl[lastInd+1:]

resp, err := http.Get(cliTarballUrl)
cli := &http.Client{}
req, _ := http.NewRequestWithContext(context.Background(), http.MethodGet, cliTarballUrl, nil)
resp, err := cli.Do(req)
if err != nil {
return nil, errors.WithMessagef(err, "failed to access Velero CLI tarball")
}
Expand Down

0 comments on commit 3c37c84

Please sign in to comment.