MCPcopy
hub / github.com/helm/helm / TestUpgradeWithValue

Function TestUpgradeWithValue

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

Source from the content-addressed store, hash-verified

195}
196
197func TestUpgradeWithValue(t *testing.T) {
198 releaseName := "funny-bunny-v2"
199 relMock, ch, chartPath := prepareMockRelease(t, releaseName)
200
201 defer resetEnv()()
202
203 store := storageFixture()
204
205 store.Create(relMock(releaseName, 3, ch))
206
207 cmd := fmt.Sprintf("upgrade %s --set favoriteDrink=tea '%s'", releaseName, chartPath)
208 _, _, err := executeActionCommandC(store, cmd)
209 if err != nil {
210 t.Errorf("unexpected error, got '%v'", err)
211 }
212
213 updatedReli, err := store.Get(releaseName, 4)
214 if err != nil {
215 t.Errorf("unexpected error, got '%v'", err)
216 }
217 updatedRel, err := releaserToV1Release(updatedReli)
218 if err != nil {
219 t.Errorf("unexpected error, got '%v'", err)
220 }
221
222 if !strings.Contains(updatedRel.Manifest, "drink: tea") {
223 t.Errorf("The value is not set correctly. manifest: %s", updatedRel.Manifest)
224 }
225
226}
227
228func TestUpgradeWithStringValue(t *testing.T) {
229 releaseName := "funny-bunny-v3"

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…