Skip to content

Commit 2f60272

Browse files
authored
acc: in case of TOML parse errors, print the path (#2837)
1 parent 5232ba4 commit 2f60272

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

acceptance/internal/config.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,11 @@ func LoadConfig(t *testing.T, dir string) (TestConfig, string) {
185185

186186
func DoLoadConfig(t *testing.T, path string) TestConfig {
187187
bytes, err := os.ReadFile(path)
188-
if err != nil {
189-
t.Fatalf("failed to read config: %s", err)
190-
}
188+
require.NoError(t, err, "Failed to read test config %s: %s", path, err)
191189

192190
var config TestConfig
193191
meta, err := toml.Decode(string(bytes), &config)
194-
require.NoError(t, err)
192+
require.NoError(t, err, "Failed to parse config %s", path)
195193

196194
keys := meta.Undecoded()
197195
if len(keys) > 0 {

0 commit comments

Comments
 (0)