]> git.openstreetmap.org Git - nominatim.git/blobdiff - docs/develop/Development-Environment.md
adapt instructions for creating the test db to dotenv
[nominatim.git] / docs / develop / Development-Environment.md
index b7b0a6731ef79b003af2844666f41abcfe73bef1..f0c36ba3f2d3a3d45e6c8228e74e56a6a0a71b3b 100644 (file)
@@ -25,7 +25,7 @@ following packages should get you started:
 
 ## Prerequisites for testing and documentation
 
-The Nominatim tests suite consists of behavioural tests (using behave) and
+The Nominatim test suite consists of behavioural tests (using behave) and
 unit tests (using PHPUnit). It has the following additional requirements:
 
 * [behave test framework](https://behave.readthedocs.io) >= 1.2.5
@@ -85,7 +85,7 @@ All tests are located in the `\test` directory.
 Some of the behavioural test expect a test database to be present. You need at
 least 2GB RAM and 10GB disk space to create the database.
 
-First create a separate directory for the test DB and Fetch the test planet
+First create a separate directory for the test DB and fetch the test planet
 data and the Tiger data for South Dakota:
 
 ```
@@ -102,13 +102,20 @@ cmake $USERNAME/Nominatim
 make
 ```
 
-Copy the test settings:
+Create a minimal test settings file:
 
 ```
-cp $USERNAME/Nominatim/test/testdb/local.php settings/
+tee .env << EOF
+NOMINATIM_DATABASE_DSN="pgsql:dbname=test_api_nominatim"
+NOMINATIM_USE_US_TIGER_DATA=yes
+NOMINATIM_TIGER_DATA_PATH=tiger
+NOMINATIM_WIKIPEDIA_DATA_PATH=$USERNAME/Nominatim/test/testdb
+EOF
 ```
 
 Inspect the file to check that all settings are correct for your local setup.
+In particular, the wikipedia path should point to the test directory in your
+Nominatim source directory.
 
 Now you can import the test database: