Bug 35548 - Move KitchenSink test on its own and control table creation
Summary: Move KitchenSink test on its own and control table creation
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marcel de Rooy
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on: 35507 35536
Blocks:
  Show dependency treegraph
 
Reported: 2023-12-12 15:41 UTC by Marcel de Rooy
Modified: 2024-04-26 20:42 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00


Attachments
Bug 35548: Test KitchenSink plugin (4.47 KB, patch)
2023-12-20 12:46 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 35548: Test KitchenSink plugin (4.50 KB, patch)
2024-01-11 09:55 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35548: Test KitchenSink plugin (4.55 KB, patch)
2024-01-12 17:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 35548: (follow-up) Fix mock statement for D10 (1.46 KB, patch)
2024-03-25 08:23 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2023-12-12 15:41:40 UTC
See bug 35507.
Since KitchenSink contains CREATE TABLE, it commits cruft into db.
Lets control that a bit more.
Comment 1 Marcel de Rooy 2023-12-20 12:46:28 UTC
Created attachment 160115 [details] [review]
Bug 35548: Test KitchenSink plugin

Removed from Plugins.t on bug 35507.
Restoring it here on its own.
Simplified a bit.

NOTE: The CREATE IF NOT EXISTS seems to commit even when the
table already exists. Therefore mocking install too.

Test plan:
Check number of records in plugin_data/methods.
Run t/db_dependent/Koha/Plugins/KitchenSink.t
Check again number of records in plugin_data/methods. Same?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Martin Renvoize 2024-01-11 09:55:12 UTC
Created attachment 160826 [details] [review]
Bug 35548: Test KitchenSink plugin

Removed from Plugins.t on bug 35507.
Restoring it here on its own.
Simplified a bit.

NOTE: The CREATE IF NOT EXISTS seems to commit even when the
table already exists. Therefore mocking install too.

Test plan:
Check number of records in plugin_data/methods.
Run t/db_dependent/Koha/Plugins/KitchenSink.t
Check again number of records in plugin_data/methods. Same?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Kyle M Hall 2024-01-12 17:05:49 UTC
Created attachment 160990 [details] [review]
Bug 35548: Test KitchenSink plugin

Removed from Plugins.t on bug 35507.
Restoring it here on its own.
Simplified a bit.

NOTE: The CREATE IF NOT EXISTS seems to commit even when the
table already exists. Therefore mocking install too.

Test plan:
Check number of records in plugin_data/methods.
Run t/db_dependent/Koha/Plugins/KitchenSink.t
Check again number of records in plugin_data/methods. Same?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Katrin Fischer 2024-03-22 11:28:18 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 5 Jonathan Druart 2024-03-22 15:29:07 UTC
Test is failing on D10

15:36:16 koha_1       | #   Failed test 'No tests run for subtest "Fun with KitchenSink, Handler->delete"'
15:36:16 koha_1       | #   at t/db_dependent/Koha/Plugins/KitchenSink.t line 72.
15:36:16 koha_1       | Can't locate object method "mock" via package "0" (perhaps you forgot to load "0"?) at t/db_dependent/Koha/Plugins/KitchenSink.t line 56.


See
  commit d130a6c66b6cc6fb3221c0ea7e26f2d0825f4f72
  Bug 35962: (bug 35843 follow-up 2) Fix BackgroundJob.t on D10
for a solution to the same failure.
Comment 6 Marcel de Rooy 2024-03-25 08:23:22 UTC
Created attachment 163765 [details] [review]
Bug 35548: (follow-up) Fix mock statement for D10

Test plan: Run t/db_dependent/Koha/Plugins/KitchenSink.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Katrin Fischer 2024-03-25 09:01:35 UTC
Follow-up pushed to master.