core: use testApplyFn in TestContext2Apply_countDecreaseToOneCorrupted

Without testApplyFn, the test can't perform the actions it's trying to
perform.
This commit is contained in:
Martin Atkins 2018-09-14 16:21:43 -07:00
parent a90d6cc599
commit dea74f9048
1 changed files with 5 additions and 4 deletions

View File

@ -2278,6 +2278,7 @@ func TestContext2Apply_countTainted(t *testing.T) {
m := testModule(t, "apply-count-tainted") m := testModule(t, "apply-count-tainted")
p := testProvider("aws") p := testProvider("aws")
p.DiffFn = testDiffFn p.DiffFn = testDiffFn
p.ApplyFn = testApplyFn
s := mustShimLegacyState(&State{ s := mustShimLegacyState(&State{
Modules: []*ModuleState{ Modules: []*ModuleState{
&ModuleState{ &ModuleState{
@ -2317,10 +2318,10 @@ func TestContext2Apply_countTainted(t *testing.T) {
t.Fatalf("diags: %s", diags.Err()) t.Fatalf("diags: %s", diags.Err())
} }
actual := strings.TrimSpace(state.String()) got := strings.TrimSpace(state.String())
expected := strings.TrimSpace(testTerraformApplyCountTaintedStr) want := strings.TrimSpace(testTerraformApplyCountTaintedStr)
if actual != expected { if got != want {
t.Fatalf("wrong result\n\ngot:\n%s\n\nwant:\n%s", actual, expected) t.Fatalf("wrong result\n\ngot:\n%s\n\nwant:\n%s", got, want)
} }
} }