fix: panic when config didn't exist in testcase file

This commit is contained in:
xucong053
2022-05-13 18:09:47 +08:00
parent b4e2c55350
commit e0430f495e

View File

@@ -60,6 +60,9 @@ func (path *TestCasePath) ToTestCase() (*TestCase, error) {
if err != nil {
return nil, err
}
if tc.Config == nil {
return nil, errors.New("incorrect testcase file format, expected config in file")
}
err = tc.makeCompat()
if err != nil {