See also some discussion on bug 41247. On that bug report we modify koha-conf.xml temporarily during a test.