From 34886c9dbebbc42bdd87d7d015ae66ddad3e9d30 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Fri, 22 Mar 2013 21:49:27 -0400 Subject: [PATCH] Bug 9909: Don't install KitchenSink plugin if plugin dir isn't writable Signed-off-by: Jared Camins-Esakov --- t/db_dependent/Plugins.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Plugins.t b/t/db_dependent/Plugins.t index 1b87d2afc5..bb7a836dd8 100755 --- a/t/db_dependent/Plugins.t +++ b/t/db_dependent/Plugins.t @@ -45,9 +45,11 @@ my @plugins = Koha::Plugins->new({ enable_plugins => 1 })->GetPlugins( 'report' ok( $plugins[0]->get_metadata()->{'name'} eq 'Test Plugin', "Koha::Plugins::GetPlugins functions correctly" ); SKIP: { - skip "plugindir not set", 3 unless C4::Context->config("pluginsdir"); - my $plugins_dir = C4::Context->config("pluginsdir"); + skip "plugindir not set", 3 unless defined $plugins_dir; + skip "plugindir not writable", 3 unless -w $plugins_dir; + skip "KitchenSink plugin already installed", 3 if (-f "$plugins_dir/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm"); + my $ae = Archive::Extract->new( archive => "$Bin/KitchenSinkPlugin.kpz", type => 'zip' ); unless ( $ae->extract( to => $plugins_dir ) ) { warn "ERROR: " . $ae->error; -- 2.39.5