Bug 31466 - t/00-check-atomic-updates.t always fails if atomic update exists
Summary: t/00-check-atomic-updates.t always fails if atomic update exists
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low blocker (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on: 31108
Blocks:
  Show dependency treegraph
 
Reported: 2022-08-25 23:10 UTC by Aleisha Amohia
Modified: 2023-06-08 22:26 UTC (History)
0 users

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


Attachments
Bug 31466: Fix t/00-check-atomic-updates.t to pass if atomic updates (1.33 KB, patch)
2022-08-25 23:30 UTC, Aleisha Amohia
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2022-08-25 23:10:00 UTC
Bug 31108 fixed the test to make it run, but now it fails if there is ever a file in the atomic updates directory. The test is 

unlike( $f, qr/.*pl$/, "check for unhandled atomic updates: $f" );

Which means the test passes if the atomic update filename DOES NOT MATCH the format something.pl. However atomic update files always match that format, so the test always fails and blocks packages from building.
Comment 1 Aleisha Amohia 2022-08-25 23:30:50 UTC
Created attachment 139810 [details] [review]
Bug 31466: Fix t/00-check-atomic-updates.t to pass if atomic updates

The way the test was previously written, it would fail if atomic updates
matched the format /.*pl$/ . This is incorrect because atomic update
names should match the format /.*pl/.

To test:
1) Run t/00-check-atomic-updates.t. Confirm test passes
2) Add an atomic update. Use the example from
https://wiki.koha-community.org/wiki/Database_updates#How_to_write_an_atomicupdate_file
3) Run t/00-check-atomic-updates.t. Confirm test fails
4) Apply patch and run t/00-check-atomic-updates.t. Test should pass!

Sponsored-by: Catalyst IT
Comment 2 Aleisha Amohia 2022-08-25 23:34:40 UTC
Never mind it has been explained to me that the test is correct and those of us doing custom packages will need to change how we handle atomic updates.