Commit b4844383 authored by Michelle Noorali's avatar Michelle Noorali

ref(helm): digest -> checksum in index file

parent 447ce5a2
......@@ -23,7 +23,7 @@ type ChartRef struct {
URL string `yaml:"url"`
Created string `yaml:"created,omitempty"`
Removed bool `yaml:"removed,omitempty"`
Digest string `yaml:"digest,omitempty"`
Checksum string `yaml:"checksum,omitempty"`
Chartfile chart.Chartfile `yaml:"chartfile"`
}
......
......@@ -117,7 +117,7 @@ func (r *ChartRepository) Index() error {
}
chartfile := ch.Chartfile()
hash, err := generateDigest(path)
hash, err := generateChecksum(path)
if err != nil {
return err
}
......@@ -137,7 +137,7 @@ func (r *ChartRepository) Index() error {
url := filepath.Join(r.URL, key+".tgz")
entry := &ChartRef{Chartfile: *chartfile, Name: chartfile.Name, URL: url, Created: created, Digest: hash, Removed: false}
entry := &ChartRef{Chartfile: *chartfile, Name: chartfile.Name, URL: url, Created: created, Checksum: hash, Removed: false}
r.IndexFile.Entries[key] = entry
......@@ -150,7 +150,7 @@ func (r *ChartRepository) Index() error {
return nil
}
func generateDigest(path string) (string, error) {
func generateChecksum(path string) (string, error) {
f, err := os.Open(path)
if err != nil {
return "", err
......
......@@ -69,8 +69,8 @@ func TestIndex(t *testing.T) {
}
timestamps[chartName] = details.Created
if details.Digest == "" {
t.Errorf("Digest was not set for %s", chartName)
if details.Checksum == "" {
t.Errorf("Checksum was not set for %s", chartName)
}
}
......
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