MCPcopy
hub / github.com/helm/helm / TestUpgradeWithStringValue

Function TestUpgradeWithStringValue

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

Source from the content-addressed store, hash-verified

226}
227
228func TestUpgradeWithStringValue(t *testing.T) {
229 releaseName := "funny-bunny-v3"
230 relMock, ch, chartPath := prepareMockRelease(t, releaseName)
231
232 defer resetEnv()()
233
234 store := storageFixture()
235
236 store.Create(relMock(releaseName, 3, ch))
237
238 cmd := fmt.Sprintf("upgrade %s --set-string favoriteDrink=coffee '%s'", releaseName, chartPath)
239 _, _, err := executeActionCommandC(store, cmd)
240 if err != nil {
241 t.Errorf("unexpected error, got '%v'", err)
242 }
243
244 updatedReli, err := store.Get(releaseName, 4)
245 if err != nil {
246 t.Errorf("unexpected error, got '%v'", err)
247 }
248 updatedRel, err := releaserToV1Release(updatedReli)
249 if err != nil {
250 t.Errorf("unexpected error, got '%v'", err)
251 }
252
253 if !strings.Contains(updatedRel.Manifest, "drink: coffee") {
254 t.Errorf("The value is not set correctly. manifest: %s", updatedRel.Manifest)
255 }
256
257}
258
259func TestUpgradeInstallWithSubchartNotes(t *testing.T) {
260

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…