change: ensure step name not empty

This commit is contained in:
debugtalk
2021-10-16 17:48:59 +08:00
parent 714bdd8135
commit ca8cda9df4
2 changed files with 12 additions and 3 deletions

View File

@@ -10,7 +10,10 @@ type stepRequestValidation struct {
}
func (s *stepRequestValidation) Name() string {
return s.step.Name
if s.step.Name != "" {
return s.step.Name
}
return fmt.Sprintf("%s %s", s.step.Request.Method, s.step.Request.URL)
}
func (s *stepRequestValidation) Type() string {