Merge pull request #29740 from hashicorp/jbardin/test-fix

fix test fixture had the instance in the wrong mod
This commit is contained in:
James Bardin 2021-10-12 14:03:33 -04:00 committed by GitHub
commit e804fce63a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1543,8 +1543,8 @@ func TestContext2Apply_destroyModuleVarProviderConfig(t *testing.T) {
p := testProvider("aws")
p.PlanResourceChangeFn = testDiffFn
state := states.NewState()
root := state.EnsureModule(addrs.RootModuleInstance)
root.SetResourceInstanceCurrent(
child := state.EnsureModule(addrs.RootModuleInstance.Child("child", addrs.NoKey))
child.SetResourceInstanceCurrent(
mustResourceInstanceAddr("aws_instance.foo").Resource,
&states.ResourceInstanceObjectSrc{
Status: states.ObjectReady,