From dea74f9048019c155b6d12850f34a0ccc78ca74a Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 14 Sep 2018 16:21:43 -0700 Subject: [PATCH] core: use testApplyFn in TestContext2Apply_countDecreaseToOneCorrupted Without testApplyFn, the test can't perform the actions it's trying to perform. --- terraform/context_apply_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/terraform/context_apply_test.go b/terraform/context_apply_test.go index 6053fb416..8e33708dd 100644 --- a/terraform/context_apply_test.go +++ b/terraform/context_apply_test.go @@ -2278,6 +2278,7 @@ func TestContext2Apply_countTainted(t *testing.T) { m := testModule(t, "apply-count-tainted") p := testProvider("aws") p.DiffFn = testDiffFn + p.ApplyFn = testApplyFn s := mustShimLegacyState(&State{ Modules: []*ModuleState{ &ModuleState{ @@ -2317,10 +2318,10 @@ func TestContext2Apply_countTainted(t *testing.T) { t.Fatalf("diags: %s", diags.Err()) } - actual := strings.TrimSpace(state.String()) - expected := strings.TrimSpace(testTerraformApplyCountTaintedStr) - if actual != expected { - t.Fatalf("wrong result\n\ngot:\n%s\n\nwant:\n%s", actual, expected) + got := strings.TrimSpace(state.String()) + want := strings.TrimSpace(testTerraformApplyCountTaintedStr) + if got != want { + t.Fatalf("wrong result\n\ngot:\n%s\n\nwant:\n%s", got, want) } }