diff --git a/pkg/chart/chart.go b/pkg/chart/chart.go index c016d3e33..8ff72f4f0 100644 --- a/pkg/chart/chart.go +++ b/pkg/chart/chart.go @@ -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 diff --git a/pkg/chart/loader/load.go b/pkg/chart/loader/load.go index 8884f70ac..751fb09e5 100644 --- a/pkg/chart/loader/load.go +++ b/pkg/chart/loader/load.go @@ -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 diff --git a/pkg/chartutil/create_test.go b/pkg/chartutil/create_test.go index 256360327..09ec7e663 100644 --- a/pkg/chartutil/create_test.go +++ b/pkg/chartutil/create_test.go @@ -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 `` - if strings.Contains(string(mychart.RawValues), "") { - t.Errorf("Did not expect %s to be present in %s", "", string(mychart.RawValues)) - } } diff --git a/pkg/chartutil/save_test.go b/pkg/chartutil/save_test.go index 3ac13b476..80b31bb5d 100644 --- a/pkg/chartutil/save_test.go +++ b/pkg/chartutil/save_test.go @@ -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") }