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