Skip to content

Commit 10a121c

Browse files
committed
test: update version command references to --version flag
1 parent e8c4070 commit 10a121c

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

internal/cli/execute_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ func TestExecute(t *testing.T) {
4646
},
4747
},
4848
{
49-
name: "Version command",
50-
args: []string{"go-broadcast", "version"},
49+
name: "Version flag",
50+
args: []string{"go-broadcast", "--version"},
5151
setupFunc: func() {
5252
// Set version info for test
5353
SetVersionInfo("test-version", "test-commit", "test-date")
@@ -307,8 +307,8 @@ func TestExecuteIntegration(t *testing.T) {
307307
},
308308
},
309309
{
310-
name: "Version command integration",
311-
args: []string{"go-broadcast", "version"},
310+
name: "Version flag integration",
311+
args: []string{"go-broadcast", "--version"},
312312
verifyOutput: func(t *testing.T, stdout, stderr string) {
313313
assert.Contains(t, stdout, "go-broadcast")
314314
assert.Contains(t, stdout, "Go Version:")

internal/cli/root_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func TestNewRootCmd(t *testing.T) {
2626
assert.True(t, cmd.SilenceErrors)
2727

2828
// Check subcommands
29-
subcommands := []string{"sync", "status", "validate", "version", "diagnose"}
29+
subcommands := []string{"sync", "status", "validate", "diagnose"}
3030
for _, name := range subcommands {
3131
t.Run(fmt.Sprintf("HasCommand%s", name), func(t *testing.T) {
3232
found := false
@@ -518,7 +518,7 @@ func TestRootCommandIntegration(t *testing.T) {
518518
assert.NotNil(t, cmd.PersistentPreRunE)
519519

520520
// Check that all expected subcommands exist
521-
expectedCommands := []string{"sync", "status", "validate", "version", "diagnose"}
521+
expectedCommands := []string{"sync", "status", "validate", "diagnose"}
522522
for _, expected := range expectedCommands {
523523
found := false
524524
for _, sub := range cmd.Commands() {

test/integration/logging_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ groups:
641641
// Test that log format is consistent across different commands
642642
commands := [][]string{
643643
{"validate", "--config", configPath, "--json"},
644-
{"version", "--json"},
644+
{"--version", "--json"},
645645
{"diagnose"},
646646
}
647647

0 commit comments

Comments
 (0)