mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
adapt tests to new dotenv environment
DB tests now can simply set the environment to change configuration variables. API tests still rely on a configuration file. Also, query.php needs to set up the CONST_* variables to work with the query scripts. That is a tiny bit messy and duplicates code but this part will need to be reworked later.
This commit is contained in:
@@ -715,6 +715,8 @@ class SetupFunctions
|
||||
$rOutputFile = fopen(CONST_InstallDir.'/settings/settings-frontend.php', 'w');
|
||||
|
||||
fwrite($rOutputFile, "<?php
|
||||
if (file_exists(getenv('NOMINATIM_SETTINGS'))) require_once(getenv('NOMINATIM_SETTINGS'));
|
||||
|
||||
@define('CONST_Database_DSN', '".getSetting('DATABASE_DSN')."');
|
||||
@define('CONST_Default_Language', ".getSetting('DEFAULT_LANGUAGE', 'false').");
|
||||
@define('CONST_Log_DB', ".(getSettingBool('LOG_DB') ? 'true' : 'false').");
|
||||
|
||||
Reference in New Issue
Block a user