From 1908aff476f6db51465e4800200c564107a279ef Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Mon, 1 Oct 2018 16:17:23 -0700 Subject: [PATCH] helper/resource: Fix duplicated function testConfig An earlier change introduced a new function testConfig to the main code for this package, which conflicted with a function of the same name in the test code. Here we rename the function from the test code, allowing for the more generally-named testConfig to be the one in the main code. --- helper/resource/map_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/helper/resource/map_test.go b/helper/resource/map_test.go index 6809687fa..69ded4cf9 100644 --- a/helper/resource/map_test.go +++ b/helper/resource/map_test.go @@ -49,7 +49,7 @@ func TestMapValidate(t *testing.T) { var es []error // Valid - c = testConfig(t, map[string]interface{}{"foo": "bar"}) + c = testConfigForMap(t, map[string]interface{}{"foo": "bar"}) ws, es = m.Validate("aws_elb", c) if len(ws) > 0 { t.Fatalf("bad: %#v", ws) @@ -59,7 +59,7 @@ func TestMapValidate(t *testing.T) { } // Invalid - c = testConfig(t, map[string]interface{}{}) + c = testConfigForMap(t, map[string]interface{}{}) ws, es = m.Validate("aws_elb", c) if len(ws) > 0 { t.Fatalf("bad: %#v", ws) @@ -69,9 +69,7 @@ func TestMapValidate(t *testing.T) { } } -func testConfig( - t *testing.T, - c map[string]interface{}) *terraform.ResourceConfig { +func testConfigForMap(t *testing.T, c map[string]interface{}) *terraform.ResourceConfig { r, err := tfconfig.NewRawConfig(c) if err != nil { t.Fatalf("bad: %s", err)