Bugzilla – Attachment 140843 Details for
Bug 31598
Fix random failure on Jenkins for t/db_dependent/Upload.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31598: Fix random failure on Jenkins for Upload.t
Bug-31598-Fix-random-failure-on-Jenkins-for-Upload.patch (text/plain), 1.56 KB, created by
Marcel de Rooy
on 2022-09-22 08:23:16 UTC
(
hide
)
Description:
Bug 31598: Fix random failure on Jenkins for Upload.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-09-22 08:23:16 UTC
Size:
1.56 KB
patch
obsolete
>From 35c26e4d265c8f085b72deb1773083925302aa41 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 22 Sep 2022 08:09:41 +0000 >Subject: [PATCH] Bug 31598: Fix random failure on Jenkins for Upload.t >Content-Type: text/plain; charset=utf-8 > >At some point the warn is made conditional for permanent >files. So it failed when TestBuilder picked a zero value >for permanent. Trivial fix. > >Test plan: >Run t/db_dependent/Upload.t a few times > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Upload.t | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Upload.t b/t/db_dependent/Upload.t >index 69506c0a5d..8b3fa3c1f0 100755 >--- a/t/db_dependent/Upload.t >+++ b/t/db_dependent/Upload.t >@@ -175,11 +175,11 @@ subtest 'Test delete via UploadedFile as well as UploadedFiles' => sub { > isnt( -e $path, 1, 'File no longer found after delete' ); > > # add another record with TestBuilder, so file does not exist >- # catch warning >- my $upload01 = $builder->build({ source => 'UploadedFile' }); >+ # catch warning (which occurs when deleting permanent file) >+ my $upload01 = $builder->build({ source => 'UploadedFile', value => { permanent => 1 } }); > warning_like { $delete = Koha::UploadedFiles->find( $upload01->{id} )->delete; } > qr/file was missing/, >- 'delete warns when file is missing'; >+ 'delete warns when permanent file is missing'; > ok( $delete, 'Deleting record was successful' ); > is( Koha::UploadedFiles->count, 4, 'Back to four uploads now' ); > >-- >2.30.2
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 31598
: 140843