feat: log transaction when running tests

This commit is contained in:
debugtalk
2021-12-08 11:12:02 +08:00
parent d0fb750c51
commit f7fc28bc53
5 changed files with 41 additions and 1 deletions

20
step.go
View File

@@ -277,3 +277,23 @@ func (s *stepTestCaseWithOptionalArgs) Type() string {
func (s *stepTestCaseWithOptionalArgs) ToStruct() *TStep {
return s.step
}
// implements IStep interface
type stepTransaction struct {
step *TStep
}
func (s *stepTransaction) Name() string {
if s.step.Name != "" {
return s.step.Name
}
return fmt.Sprintf("transaction %s %s", s.step.Transaction.Name, s.step.Transaction.Type)
}
func (s *stepTransaction) Type() string {
return "transaction"
}
func (s *stepTransaction) ToStruct() *TStep {
return s.step
}