From 971e3f17cb603bd0cee2fc63a54d242d803279fb Mon Sep 17 00:00:00 2001 From: Erin Call Date: Tue, 7 Jan 2020 12:17:54 -0800 Subject: [PATCH] Atomic option for the Upgrade step [#64] --- internal/run/upgrade.go | 4 ++++ internal/run/upgrade_test.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/internal/run/upgrade.go b/internal/run/upgrade.go index 23297d0..3efd95b 100644 --- a/internal/run/upgrade.go +++ b/internal/run/upgrade.go @@ -18,6 +18,7 @@ type Upgrade struct { ReuseValues bool Timeout string Force bool + Atomic bool cmd cmd } @@ -65,6 +66,9 @@ func (u *Upgrade) Prepare(cfg Config) error { if u.Force { args = append(args, "--force") } + if u.Atomic { + args = append(args, "--atomic") + } if u.Values != "" { args = append(args, "--set", u.Values) } diff --git a/internal/run/upgrade_test.go b/internal/run/upgrade_test.go index 5ec02db..f3a1fdf 100644 --- a/internal/run/upgrade_test.go +++ b/internal/run/upgrade_test.go @@ -100,6 +100,7 @@ func (suite *UpgradeTestSuite) TestPrepareWithUpgradeFlags() { ReuseValues: true, Timeout: "sit_in_the_corner", Force: true, + Atomic: true, } cfg := Config{} @@ -113,6 +114,7 @@ func (suite *UpgradeTestSuite) TestPrepareWithUpgradeFlags() { "--reuse-values", "--timeout", "sit_in_the_corner", "--force", + "--atomic", "--set", "age=35", "--set-string", "height=5ft10in", "--values", "/usr/local/stats",