core: fix TestContext2Apply_resourceDependsOnModuleInModule
An earlier update to make this not use info.HumanId selected the wrong fake "ami" name in the branch here. Also, the error message for this failure was terrible. :(
This commit is contained in:
parent
d104e450d8
commit
b648e3fc84
|
@ -524,7 +524,7 @@ func TestContext2Apply_resourceDependsOnModuleInModule(t *testing.T) {
|
|||
var called int32
|
||||
var checked bool
|
||||
p.ApplyFn = func(info *InstanceInfo, is *InstanceState, id *InstanceDiff) (*InstanceState, error) {
|
||||
if id.Attributes["ami"].New == "child" {
|
||||
if id.Attributes["ami"].New == "grandchild" {
|
||||
checked = true
|
||||
|
||||
// Sleep to allow parallel execution
|
||||
|
@ -532,7 +532,7 @@ func TestContext2Apply_resourceDependsOnModuleInModule(t *testing.T) {
|
|||
|
||||
// Verify that called is 0 (dep not called)
|
||||
if atomic.LoadInt32(&called) != 0 {
|
||||
return nil, fmt.Errorf("nothing else should not be called")
|
||||
return nil, fmt.Errorf("something else was applied before grandchild; grandchild should be first")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -831,6 +831,8 @@ module.child:
|
|||
aws_instance.b:
|
||||
ID = foo
|
||||
provider = provider.aws
|
||||
ami = child
|
||||
type = aws_instance
|
||||
|
||||
Dependencies:
|
||||
module.grandchild
|
||||
|
@ -838,6 +840,8 @@ module.child.grandchild:
|
|||
aws_instance.c:
|
||||
ID = foo
|
||||
provider = provider.aws
|
||||
ami = grandchild
|
||||
type = aws_instance
|
||||
`
|
||||
|
||||
const testTerraformApplyTaintStr = `
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
resource "aws_instance" "c" {
|
||||
ami = "grandchild"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue