Summary: | t/db_dependent/Sitemapper.t fails because of permissions | ||
---|---|---|---|
Product: | Koha | Reporter: | Mark Tompsett <mtompset> |
Component: | Test Suite | Assignee: | Mark Tompsett <mtompset> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | jonathan.druart, katrin.fischer, kyle, m.de.rooy, mtj |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17917 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17919 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17934 |
||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: |
Bug 17920: t/db_dependent/Sitemapper.t fails because of permissions
Bug 17920: t/db_dependent/Sitemapper.t fails because of permissions Bug 17920: t/db_dependent/Sitemapper.t fails because of permissions |
Description
Mark Tompsett
2017-01-17 06:41:51 UTC
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 |