Skip to content

Commit b91b2fb

Browse files
committed
Remove --dry-run flag from main CLI
- Remove dry-run flag definition from root command - Remove all related tests in root_test.go - CLI now operates without dry-run option - Preserve dry-run functionality in test-aws utility program
1 parent c09e81e commit b91b2fb

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

cmd/root.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,4 @@ func init() {
4242
// Global flags
4343
rootCmd.PersistentFlags().StringP("config", "c", "stackaroo.yaml", "config file (default is stackaroo.yaml)")
4444
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "verbose output")
45-
rootCmd.PersistentFlags().Bool("dry-run", false, "show what would be done without executing")
4645
}

cmd/root_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ func TestRootCmd_GlobalFlags(t *testing.T) {
4646
assert.Equal(t, "v", verboseFlag.Shorthand)
4747
assert.Contains(t, verboseFlag.Usage, "verbose output")
4848

49-
// Test dry-run flag
50-
dryRunFlag := flags.Lookup("dry-run")
51-
require.NotNil(t, dryRunFlag)
52-
assert.Equal(t, "false", dryRunFlag.DefValue)
53-
assert.Equal(t, "", dryRunFlag.Shorthand) // No shorthand for dry-run
54-
assert.Contains(t, dryRunFlag.Usage, "show what would be done without executing")
5549
}
5650

5751
func TestRootCmd_Help(t *testing.T) {
@@ -73,7 +67,6 @@ func TestRootCmd_Help(t *testing.T) {
7367
assert.Contains(t, helpOutput, "Flags:")
7468
assert.Contains(t, helpOutput, "--config")
7569
assert.Contains(t, helpOutput, "--verbose")
76-
assert.Contains(t, helpOutput, "--dry-run")
7770

7871
// Check for subcommands
7972
assert.Contains(t, helpOutput, "Available Commands:")
@@ -186,9 +179,6 @@ func TestRootCmd_FlagTypes(t *testing.T) {
186179
// Boolean flags
187180
verboseFlag := flags.Lookup("verbose")
188181
assert.Equal(t, "bool", verboseFlag.Value.Type())
189-
190-
dryRunFlag := flags.Lookup("dry-run")
191-
assert.Equal(t, "bool", dryRunFlag.Value.Type())
192182
}
193183

194184
func TestRootCmd_FlagInheritance(t *testing.T) {
@@ -202,7 +192,6 @@ func TestRootCmd_FlagInheritance(t *testing.T) {
202192

203193
assert.NotNil(t, inheritedFlags.Lookup("config"))
204194
assert.NotNil(t, inheritedFlags.Lookup("verbose"))
205-
assert.NotNil(t, inheritedFlags.Lookup("dry-run"))
206195
}
207196

208197
func TestRootCmd_LongDescription_Content(t *testing.T) {

0 commit comments

Comments
 (0)