fix: check case validation

This commit is contained in:
debugtalk
2022-06-27 18:55:06 +08:00
parent 82e4069fb1
commit b077328328
3 changed files with 7 additions and 10 deletions
+2 -2
View File
@@ -129,8 +129,8 @@ func loadCasePostman(path string) (*CasePostman, error) {
if err != nil {
return nil, errors.Wrap(err, "load postman file failed")
}
if reflect.ValueOf(*casePostman).IsZero() {
return nil, errors.New("invalid postman file")
if casePostman.Items == nil {
return nil, errors.New("invalid postman case file, missing items")
}
return casePostman, nil