Bugzilla – Attachment 131394 Details for
Bug 19169
Add a test to detect unneeded 'atomicupdate' files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19169: Add a test to detect unneeded 'atomicupdate' files
Bug-19169-Add-a-test-to-detect-unneeded-atomicupda.patch (text/plain), 2.19 KB, created by
Mason James
on 2022-03-05 03:55:39 UTC
(
hide
)
Description:
Bug 19169: Add a test to detect unneeded 'atomicupdate' files
Filename:
MIME Type:
Creator:
Mason James
Created:
2022-03-05 03:55:39 UTC
Size:
2.19 KB
patch
obsolete
>From d610c8ea35880050737942c9cfd85e49062c4cb0 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Sat, 5 Mar 2022 15:30:21 +1300 >Subject: [PATCH] Bug 19169: Add a test to detect unneeded 'atomicupdate' files >Content-Type: text/plain; charset="utf-8" > >to test... > >1/ set git repo > $ git reset --hard v21.11.03 > >2/ run test > $ prove ./t > OK > >3/ apply patch > >4/ run test again, observe FAIL > > $ prove ./t/00-check-atomic-updates.pl > ./t/00-check-atomic-updates.pl .. 1/? > # Failed test 'check for unhandled atomic updates: bug_29596.pl' > # at ./t/00-check-atomic-updates.pl line 34. > # 'bug_29596.pl' > # matches '(?^u:.*pl$)' > # Looks like you failed 1 test of 3. > ./t/00-check-atomic-updates.pl .. Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/3 subtests >--- > t/00-check-atomic-updates.pl | 37 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 37 insertions(+) > create mode 100755 t/00-check-atomic-updates.pl > >diff --git a/t/00-check-atomic-updates.pl b/t/00-check-atomic-updates.pl >new file mode 100755 >index 0000000000..d044672c89 >--- /dev/null >+++ b/t/00-check-atomic-updates.pl >@@ -0,0 +1,37 @@ >+# Copyright 2010 Mason James >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+use Test::More; >+use File::Find; >+ >+my $dir = ('installer/data/mysql/atomicupdate'); >+my @files; >+ >+find( \&wanted, $dir ); >+ >+sub wanted { >+ push @files, $_; >+ return; >+} >+ >+foreach my $f (@files) { >+ next if $f eq 'skeleton.pl'; >+ unlike( $f, qr/.*pl$/, "check for unhandled atomic updates: $f" ); >+} >+ >+done_testing(); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19169
:
131394
|
131429
|
131445