mirror of
https://github.com/helm/helm.git
synced 2026-08-09 01:21:20 +00:00
Merge pull request #5749 from adamreese/v3/rawvals
ref(pkg/chart): remove unused chart.RawValues
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user