MCPcopy
hub / github.com/helm/helm / TestInstallRelease_WithChartAndDependencyAllNotes

Function TestInstallRelease_WithChartAndDependencyAllNotes

pkg/action/install_test.go:414–438  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

412}
413
414func TestInstallRelease_WithChartAndDependencyAllNotes(t *testing.T) {
415 // Regression: Make sure that the child's notes don't override the parent's
416 is := assert.New(t)
417 instAction := installAction(t)
418 instAction.ReleaseName = "with-notes"
419 instAction.SubNotes = true
420 vals := map[string]any{}
421 resi, err := instAction.Run(buildChart(withNotes("parent"), withDependency(withNotes("child"))), vals)
422 if err != nil {
423 t.Fatalf("Failed install: %s", err)
424 }
425 res, err := releaserToV1Release(resi)
426 is.NoError(err)
427
428 r, err := instAction.cfg.Releases.Get(res.Name, res.Version)
429 is.NoError(err)
430 rel, err := releaserToV1Release(r)
431 is.NoError(err)
432 is.Equal("with-notes", rel.Name)
433 // test run can return as either 'parent\nchild' or 'child\nparent'
434 if !strings.Contains(rel.Info.Notes, "parent") && !strings.Contains(rel.Info.Notes, "child") {
435 t.Fatalf("Expected 'parent\nchild' or 'child\nparent', got '%s'", rel.Info.Notes)
436 }
437 is.Equal(rel.Info.Description, "Install complete")
438}
439
440func TestInstallRelease_DryRunClient(t *testing.T) {
441 for _, dryRunStrategy := range []DryRunStrategy{DryRunClient, DryRunServer} {

Callers

nothing calls this directly

Calls 9

installActionFunction · 0.85
buildChartFunction · 0.85
withNotesFunction · 0.85
withDependencyFunction · 0.85
FatalfMethod · 0.80
ContainsMethod · 0.80
releaserToV1ReleaseFunction · 0.70
RunMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…