Atomic option for the Upgrade step [#64]

This commit is contained in:
Erin Call 2020-01-07 12:17:54 -08:00
parent ee3dc9ff0e
commit 971e3f17cb
No known key found for this signature in database
GPG key ID: 4071FF6C15B8DAD1
2 changed files with 6 additions and 0 deletions

View file

@ -18,6 +18,7 @@ type Upgrade struct {
ReuseValues bool ReuseValues bool
Timeout string Timeout string
Force bool Force bool
Atomic bool
cmd cmd cmd cmd
} }
@ -65,6 +66,9 @@ func (u *Upgrade) Prepare(cfg Config) error {
if u.Force { if u.Force {
args = append(args, "--force") args = append(args, "--force")
} }
if u.Atomic {
args = append(args, "--atomic")
}
if u.Values != "" { if u.Values != "" {
args = append(args, "--set", u.Values) args = append(args, "--set", u.Values)
} }

View file

@ -100,6 +100,7 @@ func (suite *UpgradeTestSuite) TestPrepareWithUpgradeFlags() {
ReuseValues: true, ReuseValues: true,
Timeout: "sit_in_the_corner", Timeout: "sit_in_the_corner",
Force: true, Force: true,
Atomic: true,
} }
cfg := Config{} cfg := Config{}
@ -113,6 +114,7 @@ func (suite *UpgradeTestSuite) TestPrepareWithUpgradeFlags() {
"--reuse-values", "--reuse-values",
"--timeout", "sit_in_the_corner", "--timeout", "sit_in_the_corner",
"--force", "--force",
"--atomic",
"--set", "age=35", "--set", "age=35",
"--set-string", "height=5ft10in", "--set-string", "height=5ft10in",
"--values", "/usr/local/stats", "--values", "/usr/local/stats",