mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-12 16:01:27 +08:00
fix: panic when config didn't exist in testcase file
This commit is contained in:
@@ -60,6 +60,9 @@ func (path *TestCasePath) ToTestCase() (*TestCase, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if tc.Config == nil {
|
||||||
|
return nil, errors.New("incorrect testcase file format, expected config in file")
|
||||||
|
}
|
||||||
|
|
||||||
err = tc.makeCompat()
|
err = tc.makeCompat()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user