From 0adaa8af747a626b448bcd3614b36abab0bc6a38 Mon Sep 17 00:00:00 2001 From: Lann Martin Date: Mon, 29 Jun 2020 17:11:09 -0400 Subject: [PATCH] Add TestUpgradeWithValueFile test This test demonstrates issue #8279 --- .../testdata/testcharts/upgradetest/value.bin | 4 ++++ cmd/helm/upgrade_test.go | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 cmd/helm/testdata/testcharts/upgradetest/value.bin diff --git a/cmd/helm/testdata/testcharts/upgradetest/value.bin b/cmd/helm/testdata/testcharts/upgradetest/value.bin new file mode 100644 index 000000000..45c10222b --- /dev/null +++ b/cmd/helm/testdata/testcharts/upgradetest/value.bin @@ -0,0 +1,4 @@ +6n1RSdp,ԣBa+L $bҸ+%9,y0._B;{;W8`}Q ę-(;d8KExQbN3Xs +`e +ĉrSxZZlBf {DMvďNaފ̄΄ _a1̝۴W 귧{;&dЉ +U )g 8pTwS*DдޜᘸmA儊1|c} \ No newline at end of file diff --git a/cmd/helm/upgrade_test.go b/cmd/helm/upgrade_test.go index 6f260ae57..dae6099c3 100644 --- a/cmd/helm/upgrade_test.go +++ b/cmd/helm/upgrade_test.go @@ -193,6 +193,23 @@ func TestUpgradeWithValue(t *testing.T) { } +func TestUpgradeWithValueFile(t *testing.T) { + releaseName := "funny-bunny-v2" + relMock, ch, chartPath := prepareMockRelease(releaseName, t) + + defer resetEnv()() + + store := storageFixture() + + store.Create(relMock(releaseName, 3, ch)) + + cmd := fmt.Sprintf("upgrade %s --debug --set-file drink=testdata/testcharts/upgradetest/value.bin '%s'", releaseName, chartPath) + _, _, err := executeActionCommandC(store, cmd) + if err != nil { + t.Errorf("unexpected error, got '%v'", err) + } +} + func TestUpgradeWithStringValue(t *testing.T) { releaseName := "funny-bunny-v3" relMock, ch, chartPath := prepareMockRelease(releaseName, t)