From 1885f107a5f120683a04fd510ff9d74bd1ff9381 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Tue, 25 Sep 2018 17:19:47 -0700 Subject: [PATCH] core: Fix TestContext2Apply_destroyDeeplyNestedModule The new state.String() has slightly different output for an empty state, so we'll test that it's empty in a more direct way. --- terraform/context_apply_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/terraform/context_apply_test.go b/terraform/context_apply_test.go index 198f19243..af3fc4fe4 100644 --- a/terraform/context_apply_test.go +++ b/terraform/context_apply_test.go @@ -6282,9 +6282,8 @@ func TestContext2Apply_destroyDeeplyNestedModule(t *testing.T) { } // Test that things were destroyed - actual := strings.TrimSpace(state.String()) - if actual != "" { - t.Fatalf("epected no state, got: %s", actual) + if !state.Empty() { + t.Fatalf("wrong final state %s\nwant empty state", spew.Sdump(state)) } }