(t *testing.T)
| 438 | } |
| 439 | |
| 440 | func 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 | |
| 468 | func TestInstallRelease_DryRunHiddenSecret(t *testing.T) { |
| 469 | is := assert.New(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…