update apply test fixtures

This commit is contained in:
James Bardin 2018-05-25 12:13:22 -04:00 committed by Martin Atkins
parent 6ed1a81831
commit 8d062fc577
4 changed files with 9 additions and 9 deletions

View File

@ -453,7 +453,7 @@ func TestContext2Apply_resourceDependsOnModuleGrandchild(t *testing.T) {
info *InstanceInfo,
is *InstanceState,
id *InstanceDiff) (*InstanceState, error) {
if info.HumanId() == "module.child.grandchild.aws_instance.c" {
if info.HumanId() == "module.child.module.grandchild.aws_instance.c" {
checked = true
// Sleep to allow parallel execution
@ -509,7 +509,7 @@ func TestContext2Apply_resourceDependsOnModuleInModule(t *testing.T) {
info *InstanceInfo,
is *InstanceState,
id *InstanceDiff) (*InstanceState, error) {
if info.HumanId() == "module.child.grandchild.aws_instance.c" {
if info.HumanId() == "module.child.module.grandchild.aws_instance.c" {
checked = true
// Sleep to allow parallel execution
@ -1890,14 +1890,14 @@ func TestContext2Apply_cancel(t *testing.T) {
return &InstanceState{
ID: "foo",
Attributes: map[string]string{
"num": "2",
"value": "2",
},
}, nil
}
p.DiffFn = func(*InstanceInfo, *InstanceState, *ResourceConfig) (*InstanceDiff, error) {
return &InstanceDiff{
Attributes: map[string]*ResourceAttrDiff{
"num": &ResourceAttrDiff{
"value": &ResourceAttrDiff{
New: "bar",
},
},
@ -8340,7 +8340,7 @@ func TestContext2Apply_unknownAttribute(t *testing.T) {
}
state, diags := ctx.Apply()
if diags.HasErrors() {
if !diags.HasErrors() {
t.Fatal("should error with UnknownVariableValue")
}

View File

@ -384,7 +384,7 @@ const testTerraformApplyCancelStr = `
aws_instance.foo:
ID = foo
provider = provider.aws
num = 2
value = 2
`
const testTerraformApplyComputeStr = `

View File

@ -1,7 +1,7 @@
resource "aws_instance" "foo" {
num = "2"
value = "2"
}
resource "aws_instance" "bar" {
foo = "${aws_instance.foo.num}"
foo = "${aws_instance.foo.value}"
}

View File

@ -1,4 +1,4 @@
resource "aws_instance" "foo" {
num = "2"
compute = "foo"
compute = "unknown"
}