write provider to state for refresh nodes
and update the test state strings
This commit is contained in:
parent
c2f3522f7d
commit
3977fe8b2d
|
@ -3527,28 +3527,34 @@ STATE:
|
||||||
|
|
||||||
aws_instance.bar.0:
|
aws_instance.bar.0:
|
||||||
ID = bar0
|
ID = bar0
|
||||||
|
provider = provider.aws
|
||||||
|
|
||||||
Dependencies:
|
Dependencies:
|
||||||
aws_instance.foo.*
|
aws_instance.foo.*
|
||||||
aws_instance.bar.1:
|
aws_instance.bar.1:
|
||||||
ID = bar1
|
ID = bar1
|
||||||
|
provider = provider.aws
|
||||||
|
|
||||||
Dependencies:
|
Dependencies:
|
||||||
aws_instance.foo.*
|
aws_instance.foo.*
|
||||||
aws_instance.baz.0:
|
aws_instance.baz.0:
|
||||||
ID = baz0
|
ID = baz0
|
||||||
|
provider = provider.aws
|
||||||
|
|
||||||
Dependencies:
|
Dependencies:
|
||||||
aws_instance.bar.*
|
aws_instance.bar.*
|
||||||
aws_instance.baz.1:
|
aws_instance.baz.1:
|
||||||
ID = baz1
|
ID = baz1
|
||||||
|
provider = provider.aws
|
||||||
|
|
||||||
Dependencies:
|
Dependencies:
|
||||||
aws_instance.bar.*
|
aws_instance.bar.*
|
||||||
aws_instance.foo.0:
|
aws_instance.foo.0:
|
||||||
ID = foo0
|
ID = foo0
|
||||||
|
provider = provider.aws
|
||||||
aws_instance.foo.1:
|
aws_instance.foo.1:
|
||||||
ID = foo1
|
ID = foo1
|
||||||
|
provider = provider.aws
|
||||||
`)
|
`)
|
||||||
if actual != expected {
|
if actual != expected {
|
||||||
t.Fatalf("bad:\n%s\n\nexpected\n\n%s", actual, expected)
|
t.Fatalf("bad:\n%s\n\nexpected\n\n%s", actual, expected)
|
||||||
|
|
|
@ -416,15 +416,18 @@ root
|
||||||
const testContextRefreshModuleStr = `
|
const testContextRefreshModuleStr = `
|
||||||
aws_instance.web: (tainted)
|
aws_instance.web: (tainted)
|
||||||
ID = bar
|
ID = bar
|
||||||
|
provider = provider.aws
|
||||||
|
|
||||||
module.child:
|
module.child:
|
||||||
aws_instance.web:
|
aws_instance.web:
|
||||||
ID = new
|
ID = new
|
||||||
|
provider = provider.aws
|
||||||
`
|
`
|
||||||
|
|
||||||
const testContextRefreshOutputStr = `
|
const testContextRefreshOutputStr = `
|
||||||
aws_instance.web:
|
aws_instance.web:
|
||||||
ID = foo
|
ID = foo
|
||||||
|
provider = provider.aws
|
||||||
foo = bar
|
foo = bar
|
||||||
|
|
||||||
Outputs:
|
Outputs:
|
||||||
|
@ -439,4 +442,5 @@ const testContextRefreshOutputPartialStr = `
|
||||||
const testContextRefreshTaintedStr = `
|
const testContextRefreshTaintedStr = `
|
||||||
aws_instance.web: (tainted)
|
aws_instance.web: (tainted)
|
||||||
ID = foo
|
ID = foo
|
||||||
|
provider = provider.aws
|
||||||
`
|
`
|
||||||
|
|
|
@ -275,7 +275,7 @@ func (n *NodeDestroyResource) EvalTree() EvalNode {
|
||||||
&EvalWriteState{
|
&EvalWriteState{
|
||||||
Name: stateId,
|
Name: stateId,
|
||||||
ResourceType: n.Addr.Type,
|
ResourceType: n.Addr.Type,
|
||||||
Provider: rs.Provider,
|
Provider: n.ResolvedProvider,
|
||||||
Dependencies: rs.Dependencies,
|
Dependencies: rs.Dependencies,
|
||||||
State: &state,
|
State: &state,
|
||||||
},
|
},
|
||||||
|
|
|
@ -166,7 +166,7 @@ func (n *NodeRefreshableManagedResourceInstance) evalTreeManagedResource() EvalN
|
||||||
&EvalWriteState{
|
&EvalWriteState{
|
||||||
Name: stateId,
|
Name: stateId,
|
||||||
ResourceType: n.ResourceState.Type,
|
ResourceType: n.ResourceState.Type,
|
||||||
Provider: n.ResourceState.Provider,
|
Provider: n.ResolvedProvider,
|
||||||
Dependencies: n.ResourceState.Dependencies,
|
Dependencies: n.ResourceState.Dependencies,
|
||||||
State: &state,
|
State: &state,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue