config: Update test to reflect new behaviour

Escaped quotes are no longer supported as HIL syntax (as of the last
update to HIL), so this commit changes the Terraform config-layer test
to verify the non-presence of this behaviour for 0.7.
This commit is contained in:
James Nugent 2016-06-20 19:06:03 +03:00
parent 04f7afa04c
commit 9d6c629689
1 changed files with 5 additions and 21 deletions

View File

@ -132,22 +132,13 @@ func TestLoadFileHeredoc(t *testing.T) {
}
func TestLoadFileEscapedQuotes(t *testing.T) {
c, err := LoadFile(filepath.Join(fixtureDir, "escapedquotes.tf"))
if err != nil {
t.Fatalf("err: %s", err)
_, err := LoadFile(filepath.Join(fixtureDir, "escapedquotes.tf"))
if err == nil {
t.Fatalf("expected syntax error as escaped quotes are no longer supported")
}
if c == nil {
t.Fatal("config should not be nil")
}
if c.Dir != "" {
t.Fatalf("bad: %#v", c.Dir)
}
actual := resourcesStr(c.Resources)
if actual != strings.TrimSpace(escapedquotesResourcesStr) {
t.Fatalf("bad:\n%s", actual)
if !strings.Contains(err.Error(), "syntax error") {
t.Fatalf("expected \"syntax error\", got: %s", err)
}
}
@ -787,13 +778,6 @@ aws_instance.test (x1)
inline
`
const escapedquotesResourcesStr = `
aws_instance.quotes (x1)
ami
vars
user: var.ami
`
const basicOutputsStr = `
web_ip
vars