MCPcopy
hub / github.com/helm/helm / TestInstallRelease_DryRunClient

Function TestInstallRelease_DryRunClient

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

Source from the content-addressed store, hash-verified

438}
439
440func TestInstallRelease_DryRunClient(t *testing.T) {
441 for _, dryRunStrategy := range []DryRunStrategy{DryRunClient, DryRunServer} {
442 is := assert.New(t)
443 instAction := installAction(t)
444 instAction.DryRunStrategy = dryRunStrategy
445
446 vals := map[string]any{}
447 resi, err := instAction.Run(buildChart(withSampleTemplates()), vals)
448 if err != nil {
449 t.Fatalf("Failed install: %s", err)
450 }
451 res, err := releaserToV1Release(resi)
452 is.NoError(err)
453
454 is.Contains(res.Manifest, "---\n# Source: hello/templates/hello\nhello: world")
455 is.Contains(res.Manifest, "---\n# Source: hello/templates/goodbye\ngoodbye: world")
456 is.Contains(res.Manifest, "hello: Earth")
457 is.NotContains(res.Manifest, "hello: {{ template \"_planet\" . }}")
458 is.NotContains(res.Manifest, "empty")
459
460 _, err = instAction.cfg.Releases.Get(res.Name, res.Version)
461 is.Error(err)
462 is.Len(res.Hooks, 1)
463 is.True(res.Hooks[0].LastRun.CompletedAt.IsZero(), "expect hook to not be marked as run")
464 is.Equal(res.Info.Description, "Dry run complete")
465 }
466}
467
468func TestInstallRelease_DryRunHiddenSecret(t *testing.T) {
469 is := assert.New(t)

Callers

nothing calls this directly

Calls 10

installActionFunction · 0.85
buildChartFunction · 0.85
withSampleTemplatesFunction · 0.85
FatalfMethod · 0.80
ContainsMethod · 0.80
releaserToV1ReleaseFunction · 0.70
RunMethod · 0.65
GetMethod · 0.65
ErrorMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…