terraform: fix tests
This commit is contained in:
parent
c6474b3e5c
commit
e59ff6e92c
|
@ -196,7 +196,8 @@ func (i *VariableInterpolation) Interpolate(
|
||||||
v, ok := vs[i.key]
|
v, ok := vs[i.key]
|
||||||
if !ok {
|
if !ok {
|
||||||
return "", fmt.Errorf(
|
return "", fmt.Errorf(
|
||||||
"%s: value for variable '%s' not found", v)
|
"%s: value for variable not found",
|
||||||
|
i.key)
|
||||||
}
|
}
|
||||||
|
|
||||||
return v, nil
|
return v, nil
|
||||||
|
|
|
@ -1168,10 +1168,6 @@ func TestContextPlan_computed(t *testing.T) {
|
||||||
t.Fatalf("err: %s", err)
|
t.Fatalf("err: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(plan.Diff.Resources) < 2 {
|
|
||||||
t.Fatalf("bad: %#v", plan.Diff.Resources)
|
|
||||||
}
|
|
||||||
|
|
||||||
actual := strings.TrimSpace(plan.String())
|
actual := strings.TrimSpace(plan.String())
|
||||||
expected := strings.TrimSpace(testTerraformPlanComputedStr)
|
expected := strings.TrimSpace(testTerraformPlanComputedStr)
|
||||||
if actual != expected {
|
if actual != expected {
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
variable "value" {
|
||||||
|
default = ""
|
||||||
|
}
|
||||||
|
|
||||||
resource "aws_instance" "foo" {
|
resource "aws_instance" "foo" {
|
||||||
num = "2"
|
num = "2"
|
||||||
compute = "dynamical"
|
compute = "dynamical"
|
||||||
|
|
Loading…
Reference in New Issue