core: Trap warnings as well as errors on resourceNestedCount test

This commit is contained in:
Chris Marchesi 2017-04-20 07:31:44 -07:00
parent d41b806789
commit 744727a28a
1 changed files with 5 additions and 4 deletions

View File

@ -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()