Pass an atomic_upgrade setting to the Upgrade step [#64]
This commit is contained in:
@@ -43,6 +43,7 @@ type Config struct {
|
||||
Chart string `` // Chart argument to use in applicable helm commands
|
||||
Release string `` // Release argument to use in applicable helm commands
|
||||
Force bool `` // Pass --force to applicable helm commands
|
||||
AtomicUpgrade bool `split_words:"true"` // Pass --atomic to `helm upgrade`
|
||||
LintStrictly bool `split_words:"true"` // Pass --strict to `helm lint`
|
||||
|
||||
Stdout io.Writer `ignored:"true"`
|
||||
|
||||
@@ -109,6 +109,7 @@ var upgrade = func(cfg Config) []Step {
|
||||
ReuseValues: cfg.ReuseValues,
|
||||
Timeout: cfg.Timeout,
|
||||
Force: cfg.Force,
|
||||
Atomic: cfg.AtomicUpgrade,
|
||||
})
|
||||
|
||||
return steps
|
||||
|
||||
@@ -130,17 +130,18 @@ func (suite *PlanTestSuite) TestExecuteAbortsOnError() {
|
||||
|
||||
func (suite *PlanTestSuite) TestUpgrade() {
|
||||
cfg := Config{
|
||||
ChartVersion: "seventeen",
|
||||
DryRun: true,
|
||||
Wait: true,
|
||||
Values: "steadfastness,forthrightness",
|
||||
StringValues: "tensile_strength,flexibility",
|
||||
ValuesFiles: []string{"/root/price_inventory.yml"},
|
||||
ReuseValues: true,
|
||||
Timeout: "go sit in the corner",
|
||||
Chart: "billboard_top_100",
|
||||
Release: "post_malone_circles",
|
||||
Force: true,
|
||||
ChartVersion: "seventeen",
|
||||
DryRun: true,
|
||||
Wait: true,
|
||||
Values: "steadfastness,forthrightness",
|
||||
StringValues: "tensile_strength,flexibility",
|
||||
ValuesFiles: []string{"/root/price_inventory.yml"},
|
||||
ReuseValues: true,
|
||||
Timeout: "go sit in the corner",
|
||||
Chart: "billboard_top_100",
|
||||
Release: "post_malone_circles",
|
||||
Force: true,
|
||||
AtomicUpgrade: true,
|
||||
}
|
||||
|
||||
steps := upgrade(cfg)
|
||||
@@ -162,6 +163,7 @@ func (suite *PlanTestSuite) TestUpgrade() {
|
||||
ReuseValues: cfg.ReuseValues,
|
||||
Timeout: cfg.Timeout,
|
||||
Force: cfg.Force,
|
||||
Atomic: true,
|
||||
}
|
||||
|
||||
suite.Equal(expected, upgrade)
|
||||
|
||||
Reference in New Issue
Block a user