Robiiin 2 weeks ago committed by GitHub
commit cac6eb99b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -77,6 +77,7 @@ func NewChartRepository(cfg *Entry, getters getter.Providers) (*ChartRepository,
// DownloadIndexFile fetches the index from a repository.
func (r *ChartRepository) DownloadIndexFile() (string, error) {
indexURL, err := ResolveReferenceURL(r.Config.URL, "index.yaml")
if err != nil {
return "", err

@ -101,10 +101,13 @@ func TestConcurrencyDownloadIndex(t *testing.T) {
}
defer srv.Close()
repo, err := NewChartRepository(&Entry{
// set base environment settings
baseEntry := &Entry{
Name: "nginx",
URL: srv.URL,
}, getter.All(&cli.EnvSettings{}))
}
settings := cli.EnvSettings{}
repo, err := NewChartRepository(baseEntry, getter.All(&settings))
if err != nil {
t.Fatalf("Problem loading chart repository from %s: %v", srv.URL, err)
@ -130,7 +133,14 @@ func TestConcurrencyDownloadIndex(t *testing.T) {
go func() {
defer wg.Done()
idx, err := repo.DownloadIndexFile()
localRepo, err := NewChartRepository(baseEntry, getter.All(&settings))
if err != nil {
t.Errorf("Failed to create chart repository: %v", err)
return
}
localRepo.CachePath = repo.CachePath
idx, err := localRepo.DownloadIndexFile()
if err != nil {
t.Errorf("Failed to download index file to %s: %v", idx, err)
}

Loading…
Cancel
Save