From 1cfaf5240637248307f24ec8b251834437d0fec2 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Tue, 25 Sep 2018 17:14:19 -0700 Subject: [PATCH] core: Fix TestContext2Apply_outputOrphanModule The new state.String is not quite identical to the old, so we'll assert an empty state 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 00b577a79..198f19243 100644 --- a/terraform/context_apply_test.go +++ b/terraform/context_apply_test.go @@ -4274,9 +4274,8 @@ func TestContext2Apply_outputOrphanModule(t *testing.T) { t.Fatalf("diags: %s", diags.Err()) } - actual = strings.TrimSpace(state.String()) - if actual != "" { - t.Fatalf("expected no state, got:\n%s", actual) + if !state.Empty() { + t.Fatalf("wrong final state %s\nwant empty state", spew.Sdump(state)) } }