From 744727a28a502710fe0f41a1ef2790be13faae97 Mon Sep 17 00:00:00 2001 From: Chris Marchesi Date: Thu, 20 Apr 2017 07:31:44 -0700 Subject: [PATCH] core: Trap warnings as well as errors on resourceNestedCount test --- terraform/context_plan_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/terraform/context_plan_test.go b/terraform/context_plan_test.go index 4d9e35430..16f0d16e9 100644 --- a/terraform/context_plan_test.go +++ b/terraform/context_plan_test.go @@ -3234,11 +3234,12 @@ func TestContext2Plan_resourceNestedCount(t *testing.T) { State: s, }) - _, e := ctx.Validate() + w, e := ctx.Validate() + if len(w) > 0 { + t.Fatalf("warnings generated on validate: %#v", w) + } if len(e) > 0 { - for _, err := range e { - t.Errorf("bad: %s", err) - } + t.Fatalf("errors generated on validate: %#v", e) } _, err := ctx.Refresh()