[Koha-bugs] [Bug 12800] Can't access MARC bibliographic frameworks and other pages

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Aug 22 02:25:12 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12800

Chris Cormack <chris at bigballofwax.co.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31066|0                           |1
        is obsolete|                            |

--- Comment #6 from Chris Cormack <chris at bigballofwax.co.nz> ---
Created attachment 31067
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31067&action=edit
Bug 12800: running unit tests that use Koha::Cache breaks cache usage from
Apache

If the user runs:

 $ prove t/Cache.t

with it's system user, two situations can happen:

1) If MEMCACHED_NAMESPACE is set on koha-httpd.xml other than the default
'koha', then
 Apache sets /tmp/sharefile-koha-<namespace> and the problem is not present:
running
 the test creates /tmp/sharefile-koha-koha != /tmp/sharefile-koha-<namespace>
=> SUCCESS: no problem

2) If MEMCACHED_NAMESPACE is not set (or eq 'koha'), then there is a permission
problem
either running the unit tests, or when using any funcitonality on the UI that
needs
Koha::Cache.
Explanation: the one that is run first will set the /tmp/sharefile-koha-koha
ownership
so it will be either the dev's sys user, or www-data (or whatever apache is
using).

This patch sets a namespace for the unit tests, so there is no collision.

To test:
- On your dev setup, having MEMCACHED_NAMESPACE unset on koha-httpd.conf
- Edit a marc framework. If it fails, remove /tmp/sharefile-koha-koha, and try
again
  -> fixed. Now try running
  $ prove t/Cache.t
=> FAIL: test fails because of permission problem
- Apply the patch
- Re-run the test
=> SUCCESS: test passes
Try changing the order, etc.

The temporary file that is used is deleted after the tests are run.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list