Pass --keep-history when so instructed [#24]
This commit is contained in:
@@ -38,6 +38,7 @@ type Config struct {
|
||||
DryRun bool `split_words:"true"` // Pass --dry-run to applicable helm commands
|
||||
Wait bool `` // Pass --wait to applicable helm commands
|
||||
ReuseValues bool `split_words:"true"` // Pass --reuse-values to `helm upgrade`
|
||||
KeepHistory bool `split_words:"true"` // Pass --keep-history to `helm uninstall`
|
||||
Timeout string `` // Argument to pass to --timeout in applicable helm commands
|
||||
Chart string `` // Chart argument to use in applicable helm commands
|
||||
Release string `` // Release argument to use in applicable helm commands
|
||||
|
||||
@@ -120,8 +120,9 @@ var uninstall = func(cfg Config) []Step {
|
||||
steps = append(steps, depUpdate(cfg)...)
|
||||
}
|
||||
steps = append(steps, &run.Uninstall{
|
||||
Release: cfg.Release,
|
||||
DryRun: cfg.DryRun,
|
||||
Release: cfg.Release,
|
||||
DryRun: cfg.DryRun,
|
||||
KeepHistory: cfg.KeepHistory,
|
||||
})
|
||||
|
||||
return steps
|
||||
|
||||
@@ -198,6 +198,7 @@ func (suite *PlanTestSuite) TestUninstall() {
|
||||
DryRun: true,
|
||||
Timeout: "think about what you did",
|
||||
Release: "jetta_id_love_to_change_the_world",
|
||||
KeepHistory: true,
|
||||
}
|
||||
|
||||
steps := uninstall(cfg)
|
||||
@@ -220,8 +221,9 @@ func (suite *PlanTestSuite) TestUninstall() {
|
||||
suite.Require().IsType(&run.Uninstall{}, steps[1])
|
||||
actual, _ := steps[1].(*run.Uninstall)
|
||||
expected = &run.Uninstall{
|
||||
Release: "jetta_id_love_to_change_the_world",
|
||||
DryRun: true,
|
||||
Release: "jetta_id_love_to_change_the_world",
|
||||
DryRun: true,
|
||||
KeepHistory: true,
|
||||
}
|
||||
suite.Equal(expected, actual)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user