do not overwrite custom set module paths

Given that the module is now copied to the project directory
when no module path is set, we need the information that the
module path is empty. Therefore hand in the default module path
in a separate variable.
This commit is contained in:
Sarah Hoffmann
2021-02-02 17:33:41 +01:00
parent 36447c488a
commit cb06d1f4ca
5 changed files with 11 additions and 7 deletions

View File

@@ -63,8 +63,8 @@ def test_run_legacy_return_dont_throw_on_success(nominatim_env, test_script):
assert 0 == exec_utils.run_legacy_script(fname, nominatim_env=nominatim_env,
throw_on_fail=True)
def test_run_legacy_use_given__module_path(nominatim_env, test_script):
fname = test_script("exit($_SERVER['NOMINATIM_DATABASE_MODULE_PATH'] == 'module' ? 0 : 23);")
def test_run_legacy_use_given_module_path(nominatim_env, test_script):
fname = test_script("exit($_SERVER['NOMINATIM_DATABASE_MODULE_PATH'] == '' ? 0 : 23);")
assert 0 == exec_utils.run_legacy_script(fname, nominatim_env=nominatim_env)