The directory it attempts to create an xml file may not be writable for the user running the test. By changing the directory from the current directory to a temporary one, the test runs. After all 'chmod 777 t/db_dependent' is a bad idea.
Created attachment 59060 [details] [review] Bug 17920: t/db_dependent/Sitemapper.t fails because of permissions The directory it attempts to create an xml file may not be writable for the user running the test. By changing the directory from the current directory to a temporary one, the test runs. After all 'chmod 777 t/db_dependent' is a bad idea. TEST PLAN --------- 1) sudo koha-shell "prove t/db_dependent/Sitemapper.t" kohadev -- fails 2) apply patch 3) sudo koha-shell "prove t/db_dependent/Sitemapper.t" kohadev -- succeeds 4) run koha qa test tools
Created attachment 59067 [details] [review] Bug 17920: t/db_dependent/Sitemapper.t fails because of permissions The directory it attempts to create an xml file may not be writable for the user running the test. By changing the directory from the current directory to a temporary one, the test runs. After all 'chmod 777 t/db_dependent' is a bad idea. TEST PLAN --------- 1) sudo koha-shell "prove t/db_dependent/Sitemapper.t" kohadev -- fails 2) apply patch 3) sudo koha-shell "prove t/db_dependent/Sitemapper.t" kohadev -- succeeds 4) run koha qa test tools Tested without qa tools Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Patch looks ok but I do not recreate: sudo koha-shell "prove t/db_dependent/Sitemapper.t" kohadev Error: The instance doesn't exist: prove t/db_dependent/Sitemapper.t With -c: sudo koha-shell -c "prove t/db_dependent/Sitemapper.t" kohadev The tests pass, even without the patch.
(In reply to Jonathan Druart from comment #3) > Patch looks ok but I do not recreate: > sudo koha-shell "prove t/db_dependent/Sitemapper.t" kohadev > Error: The instance doesn't exist: prove t/db_dependent/Sitemapper.t > > With -c: > sudo koha-shell -c "prove t/db_dependent/Sitemapper.t" kohadev > > The tests pass, even without the patch. Depends on your permissions, but the patch is definitely an improvement.
Created attachment 59157 [details] [review] Bug 17920: t/db_dependent/Sitemapper.t fails because of permissions The directory it attempts to create an xml file may not be writable for the user running the test. By changing the directory from the current directory to a temporary one, the test runs. After all 'chmod 777 t/db_dependent' is a bad idea. TEST PLAN --------- 1) sudo koha-shell "prove t/db_dependent/Sitemapper.t" kohadev -- fails 2) apply patch 3) sudo koha-shell "prove t/db_dependent/Sitemapper.t" kohadev -- succeeds 4) run koha qa test tools Tested without qa tools Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mark, Here are a few other potential candidates: t/db_dependent/SuggestionEngine_ExplodedTerms.t: my $location = File::Spec->rel2abs(dirname(__FILE__)); t/db_dependent/www/auth_values_input_www.t:my $testdir = File::Spec->rel2abs( dirname(__FILE__) ); t/db_dependent/www/batch.t:my $testdir = File::Spec->rel2abs( dirname(__FILE__) ); t/db_dependent/www/search_utf8.t:my $testdir = File::Spec->rel2abs( dirname(__FILE__) ); t/db_dependent/zebra_config.pl:my $source = File::Spec->rel2abs('.');
(In reply to Marcel de Rooy from comment #6) > Mark, > Here are a few other potential candidates: > > t/db_dependent/SuggestionEngine_ExplodedTerms.t: my $location = > File::Spec->rel2abs(dirname(__FILE__)); > t/db_dependent/www/auth_values_input_www.t:my $testdir = > File::Spec->rel2abs( dirname(__FILE__) ); > t/db_dependent/www/batch.t:my $testdir = File::Spec->rel2abs( > dirname(__FILE__) ); > t/db_dependent/www/search_utf8.t:my $testdir = File::Spec->rel2abs( > dirname(__FILE__) ); > t/db_dependent/zebra_config.pl:my $source = File::Spec->rel2abs('.'); Since you mentioned these, I'll put these on a separate bug.
Pushed to master for 17.05, thanks Mark!
This patch has been pushed to 16.11.x and will be in 16.11.02. Couldn't reproduce the error on kohadevbox, but patches still pass after applying the patch.
Pushed to 16.05.x, for 16.05.08 release