Summary: | Fix t/db_dependent/Auth.t cleanup | ||
---|---|---|---|
Product: | Koha | Reporter: | Lari Taskula <lari.taskula> |
Component: | Test Suite | Assignee: | Lari Taskula <lari.taskula> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, mtj |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 18976: Fix t/db_dependent/Auth.t cleanup
Bug 18976: (follow-up) Fix t/db_dependent/Search/History.t cleanup Bug 18976: Fix t/db_dependent/Auth.t cleanup Bug 18976: (follow-up) Fix t/db_dependent/Search/History.t cleanup Bug 18976: [16.11] Add missing use statement |
Description
Lari Taskula
2017-07-24 13:42:53 UTC
Created attachment 65195 [details] [review] Bug 18976: Fix t/db_dependent/Auth.t cleanup Test t/db_dependent/Auth.t seems to have an ineffective test data cleanup. Data generated by TestBuilder is left in borrowers, branches, categories, sms_providers and sessions tables after the test. To replicate: 1. Check the row count of borrowers, branches and categories tables 2. prove t/db_dependent/Auth.t 3. Repeat step 1 4. Observe borrowers the following tables have increased in row count: - borrowers - branches - categories - sessions - sms_providers To test: 1. Before applying the patch, go through steps at "To replicate" plan 2. Apply patch 3. Go through steps at "To replicate" plan 4. Observe step 4 no longer applies and those tables have the same number of rows as before executing the test. This issue has been happening in REST tests as well, and this solution is directly copy-pasted from t/db_dependent/api/v1/cities.t Created attachment 65197 [details] [review] Bug 18976: (follow-up) Fix t/db_dependent/Search/History.t cleanup Same problem in t/db_dependent/Search/History.t. To replicate: 1. Check the row count of borrowers, branches, categories, sessions, sms_providers tables 2. prove t/db_dependent/Search/History.t 3. Repeat step 1 4. Observe borrowers the following tables have increased in row count: - borrowers - branches - categories - sessions - sms_providers To test: 1. Before applying the patch, go through steps at "To replicate" plan 2. Apply patch 3. Go through steps at "To replicate" plan 4. Observe step 4 no longer applies and those tables have the same number of rows as before executing the test. Created attachment 65284 [details] [review] Bug 18976: Fix t/db_dependent/Auth.t cleanup Test t/db_dependent/Auth.t seems to have an ineffective test data cleanup. Data generated by TestBuilder is left in borrowers, branches, categories, sms_providers and sessions tables after the test. To replicate: 1. Check the row count of borrowers, branches and categories tables 2. prove t/db_dependent/Auth.t 3. Repeat step 1 4. Observe borrowers the following tables have increased in row count: - borrowers - branches - categories - sessions - sms_providers To test: 1. Before applying the patch, go through steps at "To replicate" plan 2. Apply patch 3. Go through steps at "To replicate" plan 4. Observe step 4 no longer applies and those tables have the same number of rows as before executing the test. This issue has been happening in REST tests as well, and this solution is directly copy-pasted from t/db_dependent/api/v1/cities.t Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 65285 [details] [review] Bug 18976: (follow-up) Fix t/db_dependent/Search/History.t cleanup Same problem in t/db_dependent/Search/History.t. To replicate: 1. Check the row count of borrowers, branches, categories, sessions, sms_providers tables 2. prove t/db_dependent/Search/History.t 3. Repeat step 1 4. Observe borrowers the following tables have increased in row count: - borrowers - branches - categories - sessions - sms_providers To test: 1. Before applying the patch, go through steps at "To replicate" plan 2. Apply patch 3. Go through steps at "To replicate" plan 4. Observe step 4 no longer applies and those tables have the same number of rows as before executing the test. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Skipping QA, it will fixes selenium tests. Pushed to master for 17.11, thanks Lari! Pushed to 17.05.x, will be in 17.05.03. In order to correct selenium test failures. Patches apply, but don't work on 16.11.x: kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ perl t/db_dependent/Search/History.t 1..26 Undefined subroutine &t::lib::Mocks::mock_preference called at t/db_dependent/Search/History.t line 19. # Looks like your test exited with 255 before it could output anything. Created attachment 65390 [details] [review] Bug 18976: [16.11] Add missing use statement Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> All good this time - thx for the follow-up! These patches have been pushed to 16.11.x and will be in 16.11.11. Pushed to 16.05.x, for 16.05.16 release |