fix #1331: use str_eq to assert string and digit equality

This commit is contained in:
debugtalk
2022-06-03 23:18:58 +08:00
parent 174f07bac0
commit f1fd4a518d
5 changed files with 46 additions and 2 deletions

View File

@@ -1065,6 +1065,17 @@ func (s *StepRequestValidation) AssertStringEqual(jmesPath string, expected inte
return s
}
func (s *StepRequestValidation) AssertEqualFold(jmesPath string, expected interface{}, msg string) *StepRequestValidation {
v := Validator{
Check: jmesPath,
Assert: "equal_fold",
Expect: expected,
Message: msg,
}
s.step.Validators = append(s.step.Validators, v)
return s
}
func (s *StepRequestValidation) AssertLengthLessOrEquals(jmesPath string, expected interface{}, msg string) *StepRequestValidation {
v := Validator{
Check: jmesPath,