44 "fmt"
55 "testing"
66
7- "github.com/hashicorp/terraform/config"
87 "github.com/hashicorp/terraform/terraform"
98)
109
@@ -81,7 +80,7 @@ func TestValidator_complex(t *testing.T) {
8180 // Valid
8281 c = testConfig (t , map [string ]interface {}{
8382 "foo" : "bar" ,
84- "nested" : []map [ string ] interface {}{
83+ "nested" : []interface {}{
8584 map [string ]interface {}{"foo" : "bar" },
8685 },
8786 })
@@ -111,7 +110,7 @@ func TestValidator_complexNested(t *testing.T) {
111110
112111 // Valid
113112 c = testConfig (t , map [string ]interface {}{
114- "ingress" : []map [ string ] interface {}{
113+ "ingress" : []interface {}{
115114 map [string ]interface {}{
116115 "from_port" : "80" ,
117116 },
@@ -121,7 +120,7 @@ func TestValidator_complexNested(t *testing.T) {
121120
122121 // Valid
123122 c = testConfig (t , map [string ]interface {}{
124- "ingress" : []map [ string ] interface {}{
123+ "ingress" : []interface {}{
125124 map [string ]interface {}{
126125 "from_port" : "80" ,
127126 "cidr_blocks" : []interface {}{"foo" },
@@ -144,7 +143,7 @@ func TestValidator_complexDeepRequired(t *testing.T) {
144143 // Valid
145144 c = testConfig (t , map [string ]interface {}{
146145 "foo" : "bar" ,
147- "nested" : []map [ string ] interface {}{
146+ "nested" : []interface {}{
148147 map [string ]interface {}{"foo" : "bar" },
149148 },
150149 })
@@ -164,15 +163,8 @@ func TestValidator_complexDeepRequired(t *testing.T) {
164163 testInvalid (v , c )
165164}
166165
167- func testConfig (
168- t * testing.T ,
169- c map [string ]interface {}) * terraform.ResourceConfig {
170- r , err := config .NewRawConfig (c )
171- if err != nil {
172- t .Fatalf ("bad: %s" , err )
173- }
174-
175- return terraform .NewResourceConfig (r )
166+ func testConfig (t * testing.T , c map [string ]interface {}) * terraform.ResourceConfig {
167+ return terraform .NewResourceConfigRaw (c )
176168}
177169
178170func testInvalid (v * Validator , c * terraform.ResourceConfig ) {
0 commit comments