From acb6ed3f22545e155b66cae7dd054d360a1c1fbb Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Mon, 16 Feb 2026 17:32:40 +0100 Subject: [PATCH] don't explicitly specify defaults in argument parsing --- internal/command/arguments/state_show_test.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/internal/command/arguments/state_show_test.go b/internal/command/arguments/state_show_test.go index 2358b29834..c370197d2d 100644 --- a/internal/command/arguments/state_show_test.go +++ b/internal/command/arguments/state_show_test.go @@ -17,8 +17,7 @@ func TestParseStateShow_valid(t *testing.T) { "address only": { []string{"test_instance.foo"}, &StateShow{ - StatePath: "", - Address: "test_instance.foo", + Address: "test_instance.foo", }, }, "with state path": { @@ -51,10 +50,7 @@ func TestParseStateShow_invalid(t *testing.T) { }{ "no arguments": { nil, - &StateShow{ - StatePath: "", - Address: "", - }, + &StateShow{}, tfdiags.Diagnostics{ tfdiags.Sourceless( tfdiags.Error, @@ -66,8 +62,7 @@ func TestParseStateShow_invalid(t *testing.T) { "too many arguments": { []string{"test_instance.foo", "test_instance.bar"}, &StateShow{ - StatePath: "", - Address: "test_instance.foo", + Address: "test_instance.foo", }, tfdiags.Diagnostics{ tfdiags.Sourceless( @@ -79,10 +74,7 @@ func TestParseStateShow_invalid(t *testing.T) { }, "unknown flag": { []string{"-boop"}, - &StateShow{ - StatePath: "", - Address: "", - }, + &StateShow{}, tfdiags.Diagnostics{ tfdiags.Sourceless( tfdiags.Error,