MCPcopy Index your code
hub / github.com/helm/helm / TestUpgradeWithValuesFile

Function TestUpgradeWithValuesFile

pkg/cmd/upgrade_test.go:295–325  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

293}
294
295func TestUpgradeWithValuesFile(t *testing.T) {
296
297 releaseName := "funny-bunny-v4"
298 relMock, ch, chartPath := prepareMockRelease(t, releaseName)
299
300 defer resetEnv()()
301
302 store := storageFixture()
303
304 store.Create(relMock(releaseName, 3, ch))
305
306 cmd := fmt.Sprintf("upgrade %s --values testdata/testcharts/upgradetest/values.yaml '%s'", releaseName, chartPath)
307 _, _, err := executeActionCommandC(store, cmd)
308 if err != nil {
309 t.Errorf("unexpected error, got '%v'", err)
310 }
311
312 updatedReli, err := store.Get(releaseName, 4)
313 if err != nil {
314 t.Errorf("unexpected error, got '%v'", err)
315 }
316 updatedRel, err := releaserToV1Release(updatedReli)
317 if err != nil {
318 t.Errorf("unexpected error, got '%v'", err)
319 }
320
321 if !strings.Contains(updatedRel.Manifest, "drink: beer") {
322 t.Errorf("The value is not set correctly. manifest: %s", updatedRel.Manifest)
323 }
324
325}
326
327func TestUpgradeWithValuesFromStdin(t *testing.T) {
328

Callers

nothing calls this directly

Calls 8

prepareMockReleaseFunction · 0.85
storageFixtureFunction · 0.85
executeActionCommandCFunction · 0.85
ContainsMethod · 0.80
resetEnvFunction · 0.70
releaserToV1ReleaseFunction · 0.70
CreateMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…