Add test for Validate crash

Crash during Validate walk with nested variable default.
This commit is contained in:
James Bardin 2017-03-07 15:01:29 -05:00
parent 88cdae91e6
commit 3c41a7ca1e
2 changed files with 12 additions and 0 deletions

View File

@ -201,6 +201,12 @@ func TestConfigValidate_table(t *testing.T) {
true,
"cannot contain interp",
},
{
"nested types in variable default",
"validate-var-nested",
true,
"ERROR",
},
}
for i, tc := range cases {

View File

@ -0,0 +1,6 @@
variable "foo" {
default = [["foo", "bar"]]
}
variable "bar" {
default = [{foo = "bar"}]
}