Bug 31466

Summary: t/00-check-atomic-updates.t always fails if atomic update exists
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: Test SuiteAssignee: Aleisha Amohia <aleisha>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: blocker    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 31108    
Bug Blocks:    
Attachments: Bug 31466: Fix t/00-check-atomic-updates.t to pass if atomic updates

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.