diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 00bae1373..666e56b0b 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -124,7 +124,7 @@ func newInstallCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { RunE: func(_ *cobra.Command, args []string) error { rel, err := runInstall(args, client, valueOpts, out) if err != nil { - return err + return errors.Wrap(err, "INSTALLATION FAILED") } return outfmt.Write(out, &statusPrinter{rel, settings.Debug, false}) diff --git a/cmd/helm/install_test.go b/cmd/helm/install_test.go index b7349e3d5..ff025b809 100644 --- a/cmd/helm/install_test.go +++ b/cmd/helm/install_test.go @@ -169,7 +169,7 @@ func TestInstall(t *testing.T) { name: "install library chart", cmd: "install libchart testdata/testcharts/lib-chart", wantError: true, - golden: "output/template-lib-chart.txt", + golden: "output/install-lib-chart.txt", }, // Install, chart with bad type { diff --git a/cmd/helm/template_test.go b/cmd/helm/template_test.go index 30ee2722b..8fb8292e2 100644 --- a/cmd/helm/template_test.go +++ b/cmd/helm/template_test.go @@ -62,7 +62,7 @@ func TestTemplateCmd(t *testing.T) { name: "check chart bad type", cmd: fmt.Sprintf("template '%s'", "testdata/testcharts/chart-bad-type"), wantError: true, - golden: "output/install-chart-bad-type.txt", + golden: "output/template-chart-bad-type.txt", }, { name: "check chart with dependency which is an app chart acting as a library chart", diff --git a/cmd/helm/testdata/output/install-chart-bad-type.txt b/cmd/helm/testdata/output/install-chart-bad-type.txt index d8a3bf275..c482a793d 100644 --- a/cmd/helm/testdata/output/install-chart-bad-type.txt +++ b/cmd/helm/testdata/output/install-chart-bad-type.txt @@ -1 +1 @@ -Error: validation: chart.metadata.type must be application or library +Error: INSTALLATION FAILED: validation: chart.metadata.type must be application or library diff --git a/cmd/helm/testdata/output/install-lib-chart.txt b/cmd/helm/testdata/output/install-lib-chart.txt new file mode 100644 index 000000000..c482a793d --- /dev/null +++ b/cmd/helm/testdata/output/install-lib-chart.txt @@ -0,0 +1 @@ +Error: INSTALLATION FAILED: validation: chart.metadata.type must be application or library diff --git a/cmd/helm/testdata/output/schema-negative-cli.txt b/cmd/helm/testdata/output/schema-negative-cli.txt index d6f096e14..c4a5cc516 100644 --- a/cmd/helm/testdata/output/schema-negative-cli.txt +++ b/cmd/helm/testdata/output/schema-negative-cli.txt @@ -1,4 +1,4 @@ -Error: values don't meet the specifications of the schema(s) in the following chart(s): +Error: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s): empty: - age: Must be greater than or equal to 0 diff --git a/cmd/helm/testdata/output/schema-negative.txt b/cmd/helm/testdata/output/schema-negative.txt index f7c89dd56..929af5518 100644 --- a/cmd/helm/testdata/output/schema-negative.txt +++ b/cmd/helm/testdata/output/schema-negative.txt @@ -1,4 +1,4 @@ -Error: values don't meet the specifications of the schema(s) in the following chart(s): +Error: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s): empty: - (root): employmentInfo is required - age: Must be greater than or equal to 0 diff --git a/cmd/helm/testdata/output/subchart-schema-cli-negative.txt b/cmd/helm/testdata/output/subchart-schema-cli-negative.txt index c0883a8e8..7396b4bfe 100644 --- a/cmd/helm/testdata/output/subchart-schema-cli-negative.txt +++ b/cmd/helm/testdata/output/subchart-schema-cli-negative.txt @@ -1,4 +1,4 @@ -Error: values don't meet the specifications of the schema(s) in the following chart(s): +Error: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s): subchart-with-schema: - age: Must be greater than or equal to 0 diff --git a/cmd/helm/testdata/output/subchart-schema-negative.txt b/cmd/helm/testdata/output/subchart-schema-negative.txt index 5a84170fd..7b1f654a2 100644 --- a/cmd/helm/testdata/output/subchart-schema-negative.txt +++ b/cmd/helm/testdata/output/subchart-schema-negative.txt @@ -1,4 +1,4 @@ -Error: values don't meet the specifications of the schema(s) in the following chart(s): +Error: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s): chart-without-schema: - (root): lastname is required subchart-with-schema: diff --git a/cmd/helm/testdata/output/template-chart-bad-type.txt b/cmd/helm/testdata/output/template-chart-bad-type.txt new file mode 100644 index 000000000..d8a3bf275 --- /dev/null +++ b/cmd/helm/testdata/output/template-chart-bad-type.txt @@ -0,0 +1 @@ +Error: validation: chart.metadata.type must be application or library