Summary: | Add diag option to t::lib::Mocks::Logger | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Test Suite | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | Pushed to stable --- | QA Contact: | Kyle M Hall (khall) <kyle> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, kyle, nick, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
25.05.00,24.11.08
|
Circulation function: | |
Bug Depends on: | |||
Bug Blocks: | 38689, 40404 | ||
Attachments: |
Bug 38818: Add diag option to t::lib::Mocks::Logger
Bug 38818: Add diag option to t::lib::Mocks::Logger Bug 38818: Add diag option to t::lib::Mocks::Logger Bug 38818: Add diag option to t::lib::Mocks::Logger Bug 38818: Add diag option to t::lib::Mocks::Logger Bug 38818: Unit tests |
Description
Martin Renvoize (ashimema)
2025-01-03 14:39:10 UTC
Created attachment 176120 [details] [review] Bug 38818: Add diag option to t::lib::Mocks::Logger This patch adds a diag method to the Mocks::Logger object. This aids in debugging logging errors by simply outputting all log lines to screen in a diag statement. Created attachment 176125 [details] [review] Bug 38818: Add diag option to t::lib::Mocks::Logger This patch adds a diag method to the Mocks::Logger object. This aids in debugging logging errors by simply outputting all log lines to screen in a diag statement. Created attachment 176126 [details] [review] Bug 38818: Add diag option to t::lib::Mocks::Logger This patch adds a diag method to the Mocks::Logger object. This aids in debugging logging errors by simply outputting all log lines to screen in a diag statement. This is tested nicely using bug 38689.. just uncomment the `#$logger->debug()` lines added to the unit tests in that bug and run the tests to see the pretty output this produces Created attachment 176385 [details] [review] Bug 38818: Add diag option to t::lib::Mocks::Logger This patch adds a diag method to the Mocks::Logger object. This aids in debugging logging errors by simply outputting all log lines to screen in a diag statement. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> 1) Unit tests I think this was referring to testing the functionality, not unit tests? (In reply to Martin Renvoize (ashimema) from comment #4) > This is tested nicely using bug 38689.. just uncomment the > `#$logger->debug()` lines added to the unit tests in that bug and run the > tests to see the pretty output this produces Could you please write some tests to cover the new method? 2) Typo I was going to fix inline, but so we don't forget: FAIL t/lib/Mocks/Logger.pm FAIL spelling recieved ==> received Created attachment 178357 [details] [review] Bug 38818: Add diag option to t::lib::Mocks::Logger This patch adds a diag method to the Mocks::Logger object. This aids in debugging logging errors by simply outputting all log lines to screen in a diag statement. Sponsored-by: PTFS Europe <https://ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 178358 [details] [review] Bug 38818: Unit tests Add unit tests for the updated mock module Sponsored-by: PTFS Europe <https://ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Unit tests added for Mocking module Pushed for 25.05! Well done everyone, thank you! Pushed to 24.11.x for 24.11.08 Enhancement backported to ease the backports of test suite patches during LTS life |