mirror of
https://github.com/hashicorp/terraform.git
synced 2026-02-18 18:29:44 -05:00
don't explicitly specify defaults in argument parsing
This commit is contained in:
parent
f7cde006ff
commit
acb6ed3f22
1 changed files with 4 additions and 12 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue