To recreate: root@kohadevbox:koha$ perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only kohadev-koha@kohadevbox:koha$ prove t/db_dependent/Koha/Database/Commenter.t t/db_dependent/Koha/Database/Commenter.t .. # Failed test 'No comment for toc_request' # at t/db_dependent/Koha/Database/Commenter.t line 40. # got: '0' # expected: '1' # Failed test 'Reset for one-columned article_requests' # at t/db_dependent/Koha/Database/Commenter.t line 55. # 'ALTER TABLE koha_kohadev.article_requests MODIFY COLUMN `cancellation_reason` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL; # ALTER TABLE koha_kohadev.article_requests MODIFY COLUMN `debit_id` int(11) DEFAULT NULL; # ALTER TABLE koha_kohadev.article_requests MODIFY COLUMN `toc_request` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'borrower requested table of contents';' # doesn't match '(?^um:ALTER.*toc_request.*DEFAULT 0;(.*\n)+ALTER.*toc_request.*COMMENT.*$)' # Looks like you failed 2 tests of 9. t/db_dependent/Koha/Database/Commenter.t .. 1/2 # Failed test '->new, dry_run' # at t/db_dependent/Koha/Database/Commenter.t line 58. # Looks like you failed 1 test of 2. t/db_dependent/Koha/Database/Commenter.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests
Will have a look
(In reply to Jonathan Druart from comment #0) > To recreate: > root@kohadevbox:koha$ perl /kohadevbox/misc4dev/run_tests.pl > --run-db-upgrade-only > Cant reproduce this right away in Koha. Did new install on current master too. This may need some specific context? SQL version ? Other specifics ?
Note that Commenter.t also passes with me if I completely remove all data by drop / create db / run kohastructure.sql
(In reply to Marcel de Rooy from comment #2) > (In reply to Jonathan Druart from comment #0) > > To recreate: > > root@kohadevbox:koha$ perl /kohadevbox/misc4dev/run_tests.pl > > --run-db-upgrade-only > > > > Cant reproduce this right away in Koha. Did new install on current master > too. > This may need some specific context? > SQL version ? > Other specifics ? This is in the context of bug 34841. The --run-db-upgrade-only will reset the DB to 19.11.00 (using a dump that is present in the misc4dev repo), then run the DB upgrade process, twice. And the test suite will eventually run on top of that. Here Commenter.t is failing when it's run after the 19.11.00 DB reset+upgrade x 2
I guess this is coming from COMMENTs missing from atomic updates, when we added the columns.
Caused by bug 29093 (from a certain Marcel)
Created attachment 156030 [details] [review] Bug 34843: Fix database comment inconsistency on toc_request Bug 29093 had a dbrev without comment, but added comment to kohastructure. Test plan: Check (or remove) comment on article_requests.toc_request. Run dbrev. Check if comment was added (if you removed). Run t/db/Koha/Database/Commenter.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 156033 [details] [review] Bug 34843: Fix database comment inconsistency on toc_request Bug 29093 had a dbrev without comment, but added comment to kohastructure. Test plan: Check (or remove) comment on article_requests.toc_request. Run dbrev. Check if comment was added (if you removed). Run t/db/Koha/Database/Commenter.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.04
Nice work everyone! Pushed to oldstable for 22.11.x