Skip to content

Commit

Permalink
Removing httpclient.Client interface. (#6746)
Browse files Browse the repository at this point in the history
### Description of the change

Part 1 removing the httpclient.Client interface. See #6726 for which
this is needed.

### Benefits

Able to write code that expects a plain http.Client.
Better tests.

### Possible drawbacks

### Applicable issues

- ref #6726

### Additional information

---------

Signed-off-by: Michael Nelson <[email protected]>
  • Loading branch information
absoludity authored Sep 1, 2023
1 parent 95b6f6f commit 9782c44
Show file tree
Hide file tree
Showing 13 changed files with 368 additions and 435 deletions.
4 changes: 2 additions & 2 deletions cmd/asset-syncer/server/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ type ChartCatalog interface {
type HelmRepo struct {
content []byte
*models.AppRepositoryInternal
netClient httpclient.Client
netClient *http.Client
filter *apprepov1alpha1.FilterRuleSpec
}

Expand Down Expand Up @@ -781,7 +781,7 @@ func parseFilters(filters string) (*apprepov1alpha1.FilterRuleSpec, error) {
return filterSpec, nil
}

func getHelmRepo(namespace, name, repoURL, authorizationHeader string, filter *apprepov1alpha1.FilterRuleSpec, netClient httpclient.Client, userAgent string) (ChartCatalog, error) {
func getHelmRepo(namespace, name, repoURL, authorizationHeader string, filter *apprepov1alpha1.FilterRuleSpec, netClient *http.Client, userAgent string) (ChartCatalog, error) {
url, err := parseRepoURL(repoURL)
if err != nil {
log.Errorf("Failed to parse URL, url=%s: %v", repoURL, err)
Expand Down
Loading

0 comments on commit 9782c44

Please sign in to comment.