|
|
|
|
@ -29,6 +29,7 @@ func Test_hcl2_upgrade(t *testing.T) {
|
|
|
|
|
{folder: "variables-only", flags: []string{}},
|
|
|
|
|
{folder: "variables-with-variables", flags: []string{}},
|
|
|
|
|
{folder: "complete-variables-with-template-engine", flags: []string{}},
|
|
|
|
|
{folder: "escaped", flags: []string{}},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for _, tc := range tc {
|
|
|
|
|
@ -46,8 +47,8 @@ func Test_hcl2_upgrade(t *testing.T) {
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatalf("%v %s", err, bs)
|
|
|
|
|
}
|
|
|
|
|
expected := mustBytes(ioutil.ReadFile(expectedPath))
|
|
|
|
|
actual := mustBytes(ioutil.ReadFile(outputPath))
|
|
|
|
|
expected := string(mustBytes(ioutil.ReadFile(expectedPath)))
|
|
|
|
|
actual := string(mustBytes(ioutil.ReadFile(outputPath)))
|
|
|
|
|
|
|
|
|
|
if diff := cmp.Diff(expected, actual); diff != "" {
|
|
|
|
|
t.Fatalf("unexpected output: %s", diff)
|
|
|
|
|
|