Bug 34812 - Remove Test::DBIx::Class from Koha.t
Summary: Remove Test::DBIx::Class from Koha.t
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marcel de Rooy
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks: 34336
  Show dependency treegraph
 
Reported: 2023-09-18 07:02 UTC by Marcel de Rooy
Modified: 2023-10-14 12:28 UTC (History)
2 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:
23.11.00


Attachments
Bug 34812: Remove Test::DBIx from Koha.t (13.46 KB, patch)
2023-09-18 09:12 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 34812: Move subtests to db_dependent/Koha.t (16.86 KB, patch)
2023-09-18 09:12 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 34812: Remove Test::DBIx from Koha.t (13.49 KB, patch)
2023-09-18 10:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 34812: Move subtests to db_dependent/Koha.t (16.89 KB, patch)
2023-09-18 10:47 UTC, Martin Renvoize
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-09-18 07:02:22 UTC

    
Comment 1 Marcel de Rooy 2023-09-18 09:12:20 UTC
Created attachment 155778 [details] [review]
Bug 34812: Remove Test::DBIx from Koha.t

The DBIx fixture here is replaced by a simple mock on Libraries.
getFacets only needs the count of libraries.
Feels better than removing all libraries here..

Note: Moved tests at 'root level' to a new subtest.

Test plan:
Run t/Koha.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2023-09-18 09:12:22 UTC
Created attachment 155779 [details] [review]
Bug 34812: Move subtests to db_dependent/Koha.t

Note that a few isbn tests were identical.
Tidied the three moved subtests here.

Test plan:
Run t/db_dependent/Koha.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2023-09-18 09:12:52 UTC
Taking the liberty to move this to SO. Just run the test.
Comment 4 Martin Renvoize 2023-09-18 10:47:52 UTC
Created attachment 155796 [details] [review]
Bug 34812: Remove Test::DBIx from Koha.t

The DBIx fixture here is replaced by a simple mock on Libraries.
getFacets only needs the count of libraries.
Feels better than removing all libraries here..

Note: Moved tests at 'root level' to a new subtest.

Test plan:
Run t/Koha.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2023-09-18 10:47:55 UTC
Created attachment 155797 [details] [review]
Bug 34812: Move subtests to db_dependent/Koha.t

Note that a few isbn tests were identical.
Tidied the three moved subtests here.

Test plan:
Run t/db_dependent/Koha.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2023-09-18 10:48:27 UTC
Nice bit of tidying up.. works as expected.. Passing QA
Comment 7 Tomás Cohen Arazi 2023-09-18 15:06:09 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Fridolin Somers 2023-09-18 21:06:28 UTC
Enhancement not pushed to 23.05.x