From 3cf2830705304ab6ea3afa07539e769a7b9baedd Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 17 Oct 2019 14:48:41 -0700 Subject: [PATCH] Add test to ensure addon state is mutable for stopped clusters --- test/integration/addons_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index 2b22e8cad2..e184b8e220 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -65,6 +65,20 @@ func TestAddons(t *testing.T) { }) } }) + + // Assert that disable/enable works offline + rr, err = Run(t, exec.CommandContext(ctx, Target(), "stop", "-p", profile)) + if err != nil { + t.Errorf("%s failed: %v", rr.Args, err) + } + rr, err = Run(t, exec.CommandContext(ctx, Target(), "addons", "enable", "dashboard", "-p", profile)) + if err != nil { + t.Errorf("%s failed: %v", rr.Args, err) + } + rr, err = Run(t, exec.CommandContext(ctx, Target(), "addons", "disable", "dashboard", "-p", profile)) + if err != nil { + t.Errorf("%s failed: %v", rr.Args, err) + } } func validateIngressAddon(ctx context.Context, t *testing.T, profile string) {