Bug 30756 - Get skip block out of Koha_Authority.t and add TestBuilder
Summary: Get skip block out of Koha_Authority.t and add TestBuilder
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-14 12:15 UTC by Marcel de Rooy
Modified: 2022-08-08 18:48 UTC (History)
6 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:
22.11.00, 22.05.01, 21.11.07


Attachments
Bug 30756: Ground work for improving Koha_Authority.t (6.36 KB, patch)
2022-05-14 12:31 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30756: Further adjustments to Koha_Authority.t (15.50 KB, patch)
2022-05-14 12:31 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30756: Rename to Koha_MetadataRecord_Authority (810 bytes, patch)
2022-05-14 12:31 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30756: Ground work for improving Koha_Authority.t (6.37 KB, patch)
2022-05-15 00:21 UTC, David Nind
Details | Diff | Splinter Review
Bug 30756: Further adjustments to Koha_Authority.t (15.51 KB, patch)
2022-05-15 00:21 UTC, David Nind
Details | Diff | Splinter Review
Bug 30756: Rename to Koha_MetadataRecord_Authority (819 bytes, patch)
2022-05-15 00:21 UTC, David Nind
Details | Diff | Splinter Review
Bug 30756: Ground work for improving Koha_Authority.t (6.45 KB, patch)
2022-05-18 13:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30756: Further adjustments to Koha_Authority.t (15.59 KB, patch)
2022-05-18 13:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30756: Rename to Koha_MetadataRecord_Authority (1.13 KB, patch)
2022-05-18 13:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30756: (follow-up) Restore MARC21 authority file (9.87 KB, patch)
2022-06-05 23:24 UTC, Tomás Cohen Arazi
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 2022-05-14 12:15:34 UTC
This test contains 3 skips on Jenkins.
It uses a MARC file.
We could quite easily resolve this with TestBuilder.
Comment 1 Marcel de Rooy 2022-05-14 12:31:39 UTC
Created attachment 134998 [details] [review]
Bug 30756: Ground work for improving Koha_Authority.t

Move stuff into two subtests.

Test plan:
Run t/db_dependent/Koha_Authority.t.
If you have no imported auths, you will still see skips.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2022-05-14 12:31:43 UTC
Created attachment 134999 [details] [review]
Bug 30756: Further adjustments to Koha_Authority.t

Remove use of exported_records file in favor of TestBuilder.
Remove conditional tests with SKIP block. Create reservoir record.

Test plan:
Run t/db_dependent/Koha_Authority.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2022-05-14 12:31:47 UTC
Created attachment 135000 [details] [review]
Bug 30756: Rename to Koha_MetadataRecord_Authority

What we are actually testing here.

No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2022-05-14 12:36:23 UTC
So we should no longer see these 3 on Jenkins:

t_db_dependent_Koha_Authority_t	0.82 sec	0		3		8		11
Comment 5 David Nind 2022-05-15 00:21:43 UTC
Created attachment 135004 [details] [review]
Bug 30756: Ground work for improving Koha_Authority.t

Move stuff into two subtests.

Test plan:
Run t/db_dependent/Koha_Authority.t.
If you have no imported auths, you will still see skips.

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

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2022-05-15 00:21:50 UTC
Created attachment 135005 [details] [review]
Bug 30756: Further adjustments to Koha_Authority.t

Remove use of exported_records file in favor of TestBuilder.
Remove conditional tests with SKIP block. Create reservoir record.

Test plan:
Run t/db_dependent/Koha_Authority.t

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

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2022-05-15 00:21:56 UTC
Created attachment 135006 [details] [review]
Bug 30756: Rename to Koha_MetadataRecord_Authority

What we are actually testing here.

No test plan.

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

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2022-05-15 00:24:48 UTC
I tested in koha-testing-docker:

1. Ran tests before applying patches and these passed: prove t/db_dependent/Koha_Authority.t

2. Ran tests using new name after applying patches, and these passed: prove t/db_dependent/Koha_MetadataRecord_Authority.t 

Hope that is sufficient.
Comment 9 Marcel de Rooy 2022-05-16 06:27:35 UTC
(In reply to David Nind from comment #8)
> I tested in koha-testing-docker:
> 
> 1. Ran tests before applying patches and these passed: prove
> t/db_dependent/Koha_Authority.t
> 
> 2. Ran tests using new name after applying patches, and these passed: prove
> t/db_dependent/Koha_MetadataRecord_Authority.t 
> 
> Hope that is sufficient.

Great. Thx
Comment 10 Jonathan Druart 2022-05-18 13:00:36 UTC
Created attachment 135104 [details] [review]
Bug 30756: Ground work for improving Koha_Authority.t

Move stuff into two subtests.

Test plan:
Run t/db_dependent/Koha_Authority.t.
If you have no imported auths, you will still see skips.

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

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2022-05-18 13:00:40 UTC
Created attachment 135105 [details] [review]
Bug 30756: Further adjustments to Koha_Authority.t

Remove use of exported_records file in favor of TestBuilder.
Remove conditional tests with SKIP block. Create reservoir record.

Test plan:
Run t/db_dependent/Koha_Authority.t

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

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2022-05-18 13:00:45 UTC
Created attachment 135106 [details] [review]
Bug 30756: Rename to Koha_MetadataRecord_Authority

What we are actually testing here.

No test plan.

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

Signed-off-by: David Nind <david@davidnind.com>

JD amended patch: remove Dumper

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Tomás Cohen Arazi 2022-06-02 17:08:50 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 14 Nick Clemens 2022-06-03 12:22:50 UTC
Search.t failing now, the records file was being used there as well

t/db_dependent/Search.t:
277     $mock_zebra->load_records(
278         sprintf( "%s/%s/zebraexport/authority", $sourcedir, lc($marcflavour) ),
279         'iso2709', 'authorities', 1
280     );
Comment 15 Marcel de Rooy 2022-06-03 14:59:25 UTC
(In reply to Nick Clemens from comment #14)
> Search.t failing now, the records file was being used there as well
> 
> t/db_dependent/Search.t:
> 277     $mock_zebra->load_records(
> 278         sprintf( "%s/%s/zebraexport/authority", $sourcedir,
> lc($marcflavour) ),
> 279         'iso2709', 'authorities', 1
> 280     );

Will have a look
Comment 16 Tomás Cohen Arazi 2022-06-05 23:24:47 UTC
Created attachment 135702 [details] [review]
Bug 30756: (follow-up) Restore MARC21 authority file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 17 Marcel de Rooy 2022-06-07 11:20:40 UTC
(In reply to Tomás Cohen Arazi from comment #16)
> Created attachment 135702 [details] [review] [review]
> Bug 30756: (follow-up) Restore MARC21 authority file
> 
> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Thx.
Considering this at least a temporary fix?
When I grepped on this exported_records file, I couldnt find a reference, but it is pumped into zebraidx via the folder where it is (without file name).

A discussion on itself is how we should test the search engine. We are starting Zebra and Elastic now to do so. Calling it a mock ;)
Comment 18 Lucas Gass 2022-06-10 16:56:15 UTC
Pushed to 22.05.x for 22.05.01
Comment 19 Arthur Suzuki 2022-06-21 13:39:50 UTC
thx, pushed to 21.11.x for 21.11.07
Comment 20 Victor Grousset/tuxayo 2022-06-25 23:58:30 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.