Bugzilla – Attachment 65804 Details for
Bug 19049
Fix regression on stage-marc-import with to_marc plugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 19049: [Follow-up] Make sure that GetPlugins finds the plugin
SIGNED-OFF-Bug-19049-Follow-up-Make-sure-that-GetP.patch (text/plain), 1.72 KB, created by
Katrin Fischer
on 2017-08-10 11:51:19 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 19049: [Follow-up] Make sure that GetPlugins finds the plugin
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2017-08-10 11:51:19 UTC
Size:
1.72 KB
patch
obsolete
>From d6f4406868ac27d44b96f1b55bab6b309da7720f Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 10 Aug 2017 13:02:23 +0200 >Subject: [PATCH] [SIGNED OFF] Bug 19049: [Follow-up] Make sure that GetPlugins > finds the plugin > >We have to mock_config the pluginsdir before Plugins is loaded, and >we should pass an absolute path (not a relative one). >If you did not install the test to_marc plugin, this test would fail. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/ImportBatch.t | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/ImportBatch.t b/t/db_dependent/ImportBatch.t >index 607c71e..9c62975 100644 >--- a/t/db_dependent/ImportBatch.t >+++ b/t/db_dependent/ImportBatch.t >@@ -2,7 +2,7 @@ > > use Modern::Perl; > use Test::More tests => 14; >-use File::Basename; >+use Cwd qw(abs_path); > use File::Temp qw/tempfile/; > > use t::lib::Mocks; >@@ -12,6 +12,10 @@ use Koha::Database; > use Koha::Plugins; > > BEGIN { >+ # Mock pluginsdir before loading Plugins module >+ my $path = abs_path(__FILE__); >+ $path =~ s/(\/[^\/]+){2}$//; # remove db_dependent and filename >+ t::lib::Mocks::mock_config( 'pluginsdir', $path ); > use_ok('C4::ImportBatch'); > } > >@@ -182,7 +186,7 @@ subtest "RecordsFromMarcPlugin" => sub { > 100,a = Another > 245,a = Noise in the library|; > close $fh; >- t::lib::Mocks::mock_config( 'pluginsdir', dirname(__FILE__) . '/..' ); >+ > my ( $plugin ) = Koha::Plugins->new->GetPlugins({ metadata => { name => 'MarcFieldValues' } }); > isnt( $plugin, undef, "Plugin found" ); > my $records = C4::ImportBatch::RecordsFromMarcPlugin( $name, ref $plugin, 'UTF-8' ); >-- >2.7.4
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 19049
:
65595
|
65655
|
65656
|
65707
|
65708
|
65797
|
65802
|
65803
|
65804
|
65807
|
65808
|
65809
|
65810
|
65876
|
65877