From b1732b2cbe268dbbb26b02355b799a8ded3726d6 Mon Sep 17 00:00:00 2001 From: anonpenguin23 Date: Tue, 11 Nov 2025 06:52:31 +0200 Subject: [PATCH] refactor: simplify flag parsing in TestProdCommandFlagParsing - Removed unused `--force` and `--domain` flags from the test case to streamline the flag parsing logic. - Updated the test to focus on essential flags, enhancing clarity and maintainability. --- pkg/cli/prod_commands_test.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkg/cli/prod_commands_test.go b/pkg/cli/prod_commands_test.go index 82900d1..874a9ff 100644 --- a/pkg/cli/prod_commands_test.go +++ b/pkg/cli/prod_commands_test.go @@ -42,14 +42,11 @@ func TestProdCommandFlagParsing(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { // Extract flags manually to verify parsing logic - force := false isBootstrap := false - var vpsIP, domain, peersStr, bootstrapJoin string + var vpsIP, peersStr, bootstrapJoin string for i, arg := range tt.args { switch arg { - case "--force": - force = true case "--bootstrap": isBootstrap = true case "--peers": @@ -60,10 +57,6 @@ func TestProdCommandFlagParsing(t *testing.T) { if i+1 < len(tt.args) { vpsIP = tt.args[i+1] } - case "--domain": - if i+1 < len(tt.args) { - domain = tt.args[i+1] - } case "--bootstrap-join": if i+1 < len(tt.args) { bootstrapJoin = tt.args[i+1]