Fix tests after upgrading hcl
This commit is contained in:
parent
4f2868a019
commit
501fcd1e21
|
@ -148,11 +148,11 @@ func TestOutputWithoutValueShouldFail(t *testing.T) {
|
||||||
if code != 1 {
|
if code != 1 {
|
||||||
t.Fatalf("Should have failed: %d\n\n%s", code, ui.ErrorWriter.String())
|
t.Fatalf("Should have failed: %d\n\n%s", code, ui.ErrorWriter.String())
|
||||||
}
|
}
|
||||||
wantError := `The attribute "value" is required, but no definition was found.`
|
wantError := `The argument "value" is required, but no definition was found.`
|
||||||
if !strings.Contains(ui.ErrorWriter.String(), wantError) {
|
if !strings.Contains(ui.ErrorWriter.String(), wantError) {
|
||||||
t.Fatalf("Missing error string %q\n\n'%s'", wantError, ui.ErrorWriter.String())
|
t.Fatalf("Missing error string %q\n\n'%s'", wantError, ui.ErrorWriter.String())
|
||||||
}
|
}
|
||||||
wantError = `An attribute named "values" is not expected here. Did you mean "value"?`
|
wantError = `An argument named "values" is not expected here. Did you mean "value"?`
|
||||||
if !strings.Contains(ui.ErrorWriter.String(), wantError) {
|
if !strings.Contains(ui.ErrorWriter.String(), wantError) {
|
||||||
t.Fatalf("Missing error string %q\n\n'%s'", wantError, ui.ErrorWriter.String())
|
t.Fatalf("Missing error string %q\n\n'%s'", wantError, ui.ErrorWriter.String())
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ func TestParserLoadConfigFileFailureMessages(t *testing.T) {
|
||||||
{
|
{
|
||||||
"invalid-files/unexpected-attr.tf",
|
"invalid-files/unexpected-attr.tf",
|
||||||
hcl.DiagError,
|
hcl.DiagError,
|
||||||
"Unsupported attribute",
|
"Unsupported argument",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"invalid-files/unexpected-block.tf",
|
"invalid-files/unexpected-block.tf",
|
||||||
|
|
Loading…
Reference in New Issue