From dff42b8d567f79296c8fd4df65bbb1618e524a78 Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Fri, 13 Sep 2024 15:50:34 +0800 Subject: [PATCH] feat: add cdoe for risk control --- hrp/code/code.go | 12 ++++++++++++ hrp/summary.go | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/hrp/code/code.go b/hrp/code/code.go index 24f60ab0..9fb22da5 100644 --- a/hrp/code/code.go +++ b/hrp/code/code.go @@ -102,6 +102,13 @@ var ( TrackingFomatError = errors.New("tracking format error") // 91 ) +// risk control related: [100, 110) +var ( + RiskControlLogout = errors.New("risk control logout") // 100 + RiskControlSlideVerification = errors.New("risk control slide verification") // 101 + RiskControlAccountActivation = errors.New("risk control account activation") // 102 +) + var errorsMap = map[error]int{ // environment ConfigureError: 3, @@ -175,6 +182,11 @@ var errorsMap = map[error]int{ // trackings related TrackingGetError: 90, TrackingFomatError: 91, + + // risk control related + RiskControlLogout: 100, + RiskControlSlideVerification: 101, + RiskControlAccountActivation: 102, } func IsErrorPredefined(err error) bool { diff --git a/hrp/summary.go b/hrp/summary.go index 6ae9cf69..417b8ea1 100644 --- a/hrp/summary.go +++ b/hrp/summary.go @@ -44,7 +44,7 @@ type Summary struct { } func (s *Summary) AddCaseSummary(caseSummary *TestCaseSummary) { - log.Info().Interface("caseSummary", caseSummary).Msg("add case summary") + log.Info().Str("name", caseSummary.Name).Msg("add case summary") s.Success = s.Success && caseSummary.Success s.Stat.TestCases.Total += 1 s.Stat.TestSteps.Total += caseSummary.Stat.Total