core: Make TestContext2Apply_createBeforeDestroy fail helpful

This commit is contained in:
Martin Atkins 2018-09-17 15:09:42 -07:00
parent 7b3441f1c1
commit 14524600b1
1 changed files with 3 additions and 2 deletions

View File

@ -849,8 +849,9 @@ func TestContext2Apply_createBeforeDestroy(t *testing.T) {
}
mod := state.RootModule()
if len(mod.Resources) != 1 {
t.Fatalf("bad: %s", state)
if got, want := len(mod.Resources), 1; got != want {
t.Logf("state:\n%s", state)
t.Fatalf("wrong number of resources %d; want %d", got, want)
}
actual := strings.TrimSpace(state.String())