core: Fix TestContext2Apply_destroyComputed

The Provider field in ResourceState is now required, whereas before it
could be omitted and have Terraform try to discover a fitting provider
configuration automatically.

The automatic behavior was a compatibility shim added in v0.11 to support
states from prior versions without an explicit migration, but for v0.12
we will have a migration to our new state format anyway and so we will
fix this up during that migration pass.
This commit is contained in:
Martin Atkins 2018-05-30 16:30:18 -07:00
parent e22f1d5dce
commit b9ed280182

View File

@ -1194,6 +1194,7 @@ func TestContext2Apply_destroyComputed(t *testing.T) {
"output": "value",
},
},
Provider: "provider.aws",
},
},
},
@ -1211,13 +1212,13 @@ func TestContext2Apply_destroyComputed(t *testing.T) {
})
if p, diags := ctx.Plan(); diags.HasErrors() {
t.Fatalf("diags: %s", diags.Err())
t.Fatalf("plan errors: %s", diags.Err())
} else {
t.Logf(p.String())
t.Logf("plan:\n\n%s", p.String())
}
if _, diags := ctx.Apply(); diags.HasErrors() {
t.Fatalf("diags: %s", diags.Err())
t.Fatalf("apply errors: %s", diags.Err())
}
}