Commit 447ce5a2 authored by Michelle Noorali's avatar Michelle Noorali

ref(helm): fix chart url in index file

parent 7c268211
......@@ -135,7 +135,9 @@ func (r *ChartRepository) Index() error {
created = time.Now().UTC().String()
}
entry := &ChartRef{Chartfile: *chartfile, Name: chartfile.Name, URL: r.URL, Created: created, Digest: hash, Removed: false}
url := filepath.Join(r.URL, key+".tgz")
entry := &ChartRef{Chartfile: *chartfile, Name: chartfile.Name, URL: url, Created: created, Digest: hash, Removed: false}
r.IndexFile.Entries[key] = entry
......
......@@ -90,6 +90,10 @@ func TestIndex(t *testing.T) {
if v.Created != created {
t.Errorf("Expected Created timestamp to be %s, but got %s for chart %s", created, v.Created, chart)
}
expectedURL := filepath.Join(cr.URL, chart+".tgz")
if v.URL != expectedURL {
t.Errorf("Expected url in entry to be %s but got %s for chart: %s", expectedURL, v.URL, chart)
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment