Bugzilla – Attachment 168781 Details for
Bug 37146
plugin_launcher.pl allows running of any Perl file on file system
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37146: Add tests
Bug-37146-Add-tests.patch (text/plain), 1.40 KB, created by
Jonathan Druart
on 2024-07-11 09:40:49 UTC
(
hide
)
Description:
Bug 37146: Add tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-07-11 09:40:49 UTC
Size:
1.40 KB
patch
obsolete
>From 3d5eb0ee94af6ef8d1e6e533591437eb2d483679 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 11 Jul 2024 11:40:35 +0200 >Subject: [PATCH] Bug 37146: Add tests > >--- > t/db_dependent/FrameworkPlugin.t | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/FrameworkPlugin.t b/t/db_dependent/FrameworkPlugin.t >index 679d69b9535..731f97df6dd 100755 >--- a/t/db_dependent/FrameworkPlugin.t >+++ b/t/db_dependent/FrameworkPlugin.t >@@ -3,8 +3,9 @@ use Modern::Perl; > use CGI; > use File::Temp qw/tempfile/; > use Getopt::Long; >+use Test::More tests => 7; > use Test::MockModule; >-use Test::More tests => 6; >+use Test::Warn; > > use t::lib::Mocks; > use t::lib::TestBuilder; >@@ -61,6 +62,19 @@ subtest 'Test06 -- test biblio_008' => sub { > is( substr($field, 15, 3), '|||', 'Check country fallback for undefined' ); > }; > >+subtest 'Test07 -- validate input' => sub { >+ plan tests => 4; >+ >+ my $plugin = Koha::FrameworkPlugin->new( { name => '../../misc/maintenance/touch_all_biblios.pl' } ); >+ warning_like { $plugin->launch } qr{Attempt to load}; >+ like( $plugin->errstr, qr{File not found} ); >+ >+ $plugin = Koha::FrameworkPlugin->new( { name => 'non-existent-plugin.pl' } ); >+ warning_like { $plugin->launch } q{}; >+ like( $plugin->errstr, qr{File not found} ); >+ >+}; >+ > $schema->storage->txn_rollback; > > sub test01 { >-- >2.34.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 37146
:
167944
|
167957
|
168301
| 168781