Bug 34336

Summary: Test::DBIx::Class should be removed
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, fridolin.somers, jonathan.druart, martin.renvoize, mtj, tomascohen
Version: MainKeywords: dependency
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33833
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Bug Depends on: 33833, 33869, 33870, 34415, 34812, 34825, 34887, 34967, 34968, 34969, 34970    
Bug Blocks:    
Attachments: Bug 34336: Remove the dependency for Test::DBIx::Class
Bug 34336: Remove the dependency for Test::DBIx::Class

Description Marcel de Rooy 2023-07-21 07:15:29 UTC
See 33833

Our use is limited. The tests are harder to read imo than the TestBuilder tests, but that could be a personal idea.
Using the module may hide/oversimplify what we actually need. When removing the module somewhere, a constraint came up that was hidden by TDC but should be dealt with in the test.
The module has a history of laborious installing but that is probably history.

I opt for removing it in the few tests using it. What do you think?
Comment 1 David Cook 2023-07-24 00:56:02 UTC
I don't know enough about its usage but it looks like it hasn't been updated since 2016. 

At a glance, it seems like it might be better for smaller simpler projects.
Comment 2 Martin Renvoize (ashimema) 2023-07-25 14:02:10 UTC
I don't really see any real benefit of keeping it around at this stage.

As some point, I like the idea of trying to make a more database independent test set.. but in reality, the integration tests we have are in many ways more helpful.
Comment 3 Jonathan Druart 2023-07-27 09:07:49 UTC
Go ahead!
Comment 4 Mason James 2023-09-27 02:42:22 UTC
(In reply to Marcel de Rooy from comment #0)
> See 33833
> 
> The module has a history of laborious installing but that is probably
> history.

some good news, the package has arrived in debian/ubuntu stable

https://packages.debian.org/bookworm/all/libtest-dbix-class-perl
Comment 5 Marcel de Rooy 2023-09-30 07:05:01 UTC
(In reply to Mason James from comment #4)
> (In reply to Marcel de Rooy from comment #0)
> > See 33833
> > 
> > The module has a history of laborious installing but that is probably
> > history.
> 
> some good news, the package has arrived in debian/ubuntu stable
> 
> https://packages.debian.org/bookworm/all/libtest-dbix-class-perl

More good news: We are almost ready to remove it.
Comment 6 Marcel de Rooy 2023-10-06 06:56:48 UTC
Created attachment 156589 [details] [review]
Bug 34336: Remove the dependency for Test::DBIx::Class

The module is removed from t.
We only have 01-test_dbic.t and we do not need it any longer.

Test plan:
git grep for Test::DBIx::Class. You should only see release notes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Marcel de Rooy 2023-10-06 06:57:13 UTC
Trivial last patch in a series: Self SO
Comment 8 Jonathan Druart 2023-10-06 11:45:57 UTC
Created attachment 156616 [details] [review]
Bug 34336: Remove the dependency for Test::DBIx::Class

The module is removed from t.
We only have 01-test_dbic.t and we do not need it any longer.

Test plan:
git grep for Test::DBIx::Class. You should only see release notes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Tomás Cohen Arazi (tcohen) 2023-10-09 14:42:27 UTC
Thank you guys. You are awesome.
Comment 10 Tomás Cohen Arazi (tcohen) 2023-10-09 14:42:57 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 11 Fridolin Somers 2023-10-09 19:50:32 UTC
Enhancement not pushed to 23.05.x