fortio
fortio copied to clipboard
add golden copies of log output (presence and absence of Warning/Errors) for tests
To avoid bugs like #294 we should check for log output during e2e and unit tests
In order to avoid those checks to be too brittle we should filter out timestamp, line numbers and level < info and have an easy way to bless the new output as golden when making logging improvements
some of those are features of the log library already
Hi @ldemailly I'm new to this repo. Can you please guide me to appropriate code part? and a bit of explanation about the issue would be really helpful!
@rdanielwetan hi ! sorry for the delay, I've been quite busy and thanks for wanting to help
the relevant code here is the _tests
some of the tests - mostly the logger tests, do check the output but most other tests don't
https://github.com/fortio/fortio/blob/master/log/logger_test.go#L84-L87
but the idea there is to generalize so as we're running tests we flag if the warning/errors logged are as expected or not
in a generic way vs 1 by 1
so this may not be a very easy "first issue"