From 3913bb70476d5c4f0376c5c60ce7863fcfd79b51 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Tue, 26 Dec 2023 11:36:15 -0300 Subject: [PATCH] make generate Signed-off-by: Eduardo Apolinario --- .../launchplan/updateconfig_flags_test.go | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/cmd/config/subcommand/launchplan/updateconfig_flags_test.go b/cmd/config/subcommand/launchplan/updateconfig_flags_test.go index a4e8ccc3..fc58e7ac 100755 --- a/cmd/config/subcommand/launchplan/updateconfig_flags_test.go +++ b/cmd/config/subcommand/launchplan/updateconfig_flags_test.go @@ -99,28 +99,42 @@ func TestUpdateConfig_SetFlags(t *testing.T) { cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) - t.Run("Test_deactivate", func(t *testing.T) { + t.Run("Test_activate", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("deactivate", testValue) - if vBool, err := cmdFlags.GetBool("deactivate"); err == nil { - testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Deactivate) + cmdFlags.Set("activate", testValue) + if vBool, err := cmdFlags.GetBool("activate"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Activate) } else { assert.FailNow(t, err.Error()) } }) }) - t.Run("Test_activate", func(t *testing.T) { + t.Run("Test_archive", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("activate", testValue) - if vBool, err := cmdFlags.GetBool("activate"); err == nil { - testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Activate) + cmdFlags.Set("archive", testValue) + if vBool, err := cmdFlags.GetBool("archive"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Archive) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_deactivate", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("deactivate", testValue) + if vBool, err := cmdFlags.GetBool("deactivate"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Deactivate) } else { assert.FailNow(t, err.Error())