ref(pkg/chart): remove unused chart.RawValues

Signed-off-by: Adam Reese <adam@reese.io>
pull/5749/head
Adam Reese 5 years ago
parent 1a675f8f55
commit 45f63628e1
No known key found for this signature in database
GPG Key ID: 06F35E60A7A18DD6

@ -27,8 +27,6 @@ type Chart struct {
Lock *Lock
// Templates for this chart.
Templates []*File
// TODO Delete RawValues after unit tests for `create` are refactored.
RawValues []byte
// Values are default config for this template.
Values map[string]interface{}
// Schema is an optional JSON schema for imposing structure on Values

@ -97,7 +97,6 @@ func LoadFiles(files []*BufferedFile) (*chart.Chart, error) {
if err := yaml.Unmarshal(f.Data, &c.Values); err != nil {
return c, errors.Wrap(err, "cannot load values.yaml")
}
c.RawValues = f.Data
case f.Name == "values.schema.json":
c.Schema = f.Data

@ -20,7 +20,6 @@ import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
"helm.sh/helm/pkg/chart"
@ -129,9 +128,4 @@ func TestCreateFrom(t *testing.T) {
t.Errorf("Expected %s to be a file.", f)
}
}
// Ensure we replace `<CHARTNAME>`
if strings.Contains(string(mychart.RawValues), "<CHARTNAME>") {
t.Errorf("Did not expect %s to be present in %s", "<CHARTNAME>", string(mychart.RawValues))
}
}

@ -59,14 +59,9 @@ func TestSave(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if c2.Name() != c.Name() {
t.Fatalf("Expected chart archive to have %q, got %q", c.Name(), c2.Name())
}
// FIXME
// if !bytes.Equal(c2.RawValues, c.RawValues) {
// t.Fatal("Values data did not match")
// }
if len(c2.Files) != 1 || c2.Files[0].Name != "scheherazade/shahryar.txt" {
t.Fatal("Files data did not match")
}
@ -102,10 +97,6 @@ func TestSaveDir(t *testing.T) {
if c2.Name() != c.Name() {
t.Fatalf("Expected chart archive to have %q, got %q", c.Name(), c2.Name())
}
// FIXME
// if !bytes.Equal(c2.RawValues, c.RawValues) {
// t.Fatal("Values data did not match")
// }
if len(c2.Files) != 1 || c2.Files[0].Name != "scheherazade/shahryar.txt" {
t.Fatal("Files data did not match")
}

Loading…
Cancel
Save