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 91d511fac3
commit ac2b8da88f

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 {