Closed LuisHudson25 closed 3 years ago
Hello,
I reproduce the issue and the issue come from smartystreets/assertions module. When you compare 2 strings with assertions module, comparison is an alphabetical comparison and in alphabetical order 3 is before 1 (less_than.go line 114) So the assertion "result.systemout ShouldBeLessThan 10" failed and the assertion "result.systemout ShouldBeLessThan 9" passed. To resolve the issue, you must parse the string before send it to assertions module. To do it:
I'm not Venom product owner but I think this solution is acceptable ? @yesnault
Regards
@kevinramage yes, it's the solution
I create PR-278 to fix the issue
Fixed on master with https://github.com/ovh/venom/commit/47441c3f614fbe9b1aaa121aae611d3bf1b4c16e
Great, thank you both of you !
Hello,
It seems that ShouldBeLessThan assertion is not working.
I'm using venom v0.27.0 and the following example: `version: "2"
name: Test Assertions
testcases:
I get the error: "Expected '3' to be less than '10'". I'm not very good in maths, but I think there is a problem here :-)
I tried to use the function go assertions.ShouldBeLessThan and it's working as expected so I think it comes from the venom integration.
Thanks for this wonderful tool. Luis