mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-26 01:34:00 -04:00
added additional check on error message in negative test case
This commit is contained in:
@@ -134,5 +134,9 @@ func TestHCL2Formatter_FormatNegativeCases(t *testing.T) {
|
||||
if tc.errExpected && !diags.HasErrors() {
|
||||
t.Fatalf("Expected error but got none")
|
||||
}
|
||||
|
||||
if diags[0].Detail != "file testdata/format/test.json is not a HCL file" {
|
||||
t.Fatalf("Expected error messge did not received")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user