Add tests to udp::handlers:handle_announce #91
Conversation
ae3cad2 to
0480390
Compare
|
There are two "false failure" tests:
I do not know why yet. I do not even know whether the production code is OK and it's a false failure test, or there is a bug. The errors are:
|
udp::handlers:handle_announce functionudp::handlers:handle_announce
0480390 to
7f1bd4f
Compare
I found out the problem. Loopback IP addresses have special behaviour, and I was using loopback addresses in the tests; therefore, it's not a bug. I fixed the tests, and I will continue working on adding new tests for the loopback cases. |
9d0a78b to
e879b18
Compare
|
hi @da2ce7 @WarmBeer this is almost done. TODO:
The tests are: I would like to see some indent on the output for each mod like other testing frameworks, but it seems rust does not support that behaviour. Something like this: Ideally lines should be like: instead of: That's why I still must review the names. I have not changed the prod code except for one new method:
It makes tests much more readable. Without that method, I need much more "arrange" code in the test. We should move a lot of logic out of the controller On the other hand, since the mod is very big now, we could create a new mod |
e879b18 to
869a707
Compare
869a707 to
c1ede2a
Compare
7a641d2 to
ba6b26d
Compare
9cd7e9b to
798d3d1
Compare
Depends on: #82