terraform: failing test case

pull/4747/head
Mitchell Hashimoto 10 years ago
parent 7ab19c62e6
commit 54de9057ba

@ -104,6 +104,29 @@ func TestContext2Plan_emptyDiff(t *testing.T) {
}
}
func TestContext2Plan_escapedVar(t *testing.T) {
m := testModule(t, "plan-escaped-var")
p := testProvider("aws")
p.DiffFn = testDiffFn
ctx := testContext2(t, &ContextOpts{
Module: m,
Providers: map[string]ResourceProviderFactory{
"aws": testProviderFuncFixed(p),
},
})
plan, err := ctx.Plan()
if err != nil {
t.Fatalf("err: %s", err)
}
actual := strings.TrimSpace(plan.String())
expected := strings.TrimSpace(testTerraformPlanEscapedVarStr)
if actual != expected {
t.Fatalf("bad:\n%s", actual)
}
}
func TestContext2Plan_minimal(t *testing.T) {
m := testModule(t, "plan-empty")
p := testProvider("aws")

@ -983,6 +983,18 @@ STATE:
<no state>
`
const testTerraformPlanEscapedVarStr = `
DIFF:
CREATE: aws_instance.foo
foo: "" => "bar-${baz}"
type: "" => "aws_instance"
STATE:
<no state>
`
const testTerraformPlanModulesStr = `
DIFF:

@ -0,0 +1,3 @@
resource "aws_instance" "foo" {
foo = "bar-$${baz}"
}
Loading…
Cancel
Save