Commit Graph

33 Commits

Author SHA1 Message Date
Sarah Hoffmann
a263e54b94 enable BDD tests for different tokenizers
The tokenizer to be used can be choosen with -DTOKENIZER.

Adapt all tests, so that they work with legacy_icu tokenizer.
Move lookup in word table to a function in the tokenizer.
Special phrases are temporarily imported from the wiki until
we have an implementation that can import from file. TIGER
tests do not work yet.
2021-05-05 10:31:51 +02:00
Sarah Hoffmann
2f73bb3643 bdd: directly call utility scripts in lib
This removes the dependency on php-symfony-dotenv for the tests.
2021-01-14 18:19:22 +01:00
Sarah Hoffmann
ee18a511c6 bdd: import API test DB as part of step setup
In the future, the BDD tests will simply set up the required
test database themselves. Like with the template database, it
is not reimported when it already exists unless that is explicitly
forced.

Makes most of the API tests currently fail because they still
point to old test data.
2021-01-07 11:51:38 +01:00
Sarah Hoffmann
faa85ded50 bdd: move NominatimEnvironment into separate file
Also cleans up and modernizes the code and adds documentation.
2021-01-04 17:54:51 +01:00
Sarah Hoffmann
f727620859 bdd: move geoemtry creation into separate file
Also renames the OsmDataFactory in the more appropriate
GeometryFactory and modernizes code for python3.
2021-01-04 16:34:40 +01:00
Sarah Hoffmann
843d3a137c remove stale code for python2 2021-01-04 14:14:34 +01:00
Sarah Hoffmann
4aba70caee create a temporary project dir for tests
The project directory contains the website script as
configured through the test configuration. This means
that tests are now completely independet of any
configuration that may be contained in the build
directory.

Also removes the hack to inject additional settings via
a environment variable.
2021-01-04 11:39:45 +01:00
Sarah Hoffmann
4ca7197826 replace nose assertions with simple asserts 2021-01-03 17:21:24 +01:00
Sarah Hoffmann
33b038ce6f tests: always create the config file
There is also one database test that uses the API functions.
2020-12-19 17:55:46 +01:00
Sarah Hoffmann
d97aed8741 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.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
b5480f6e36 reorganise path settings in config
CONST_BasePath is split into separate configuration variables
for binaries, libraries and data. These variables as well as
the installation path are now set in the executable directly and
no longer configurable via project settings.

This is the first step towards an installable software. The
executables should know per installation where to find their
necessary data to execute. Project configuration needs to be
restricted to settings that really concern the specific Nominatim
installation.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
bfe92ea191 bdd tests: enforce use of full import style 2019-12-01 16:25:39 +01:00
Sarah Hoffmann
2c21cbb5e6 update osm2pgsql (downgrading unnamed places)
Also adds tests for updating unnamed places.
2019-06-10 18:22:11 +02:00
marc tobias
d4b633bfc5 replace database abstraction DB with PDO 2019-03-09 00:18:15 +01:00
marc tobias
3be797c759 BDD: support for DB_PORT environment variable 2019-02-09 20:54:18 +01:00
Eric Stadtherr
62747c934d Work on setup/update scripts, unit tests, and documentation to enable Postgres server to be optionally configured on a remote host 2018-07-21 12:09:47 -06:00
mtmail
7075a5828e
add JSON format to /status endpoint (#1013)
add JSON format to /status endpoint
2018-05-04 23:37:48 +02:00
mtmail
3cdbcbff8f
get apt-get php-db package running on travis-ci (#973)
travis: /usr/bin/env php whenever calling PHP scripts to deal with phpenv
2018-04-12 00:54:59 +02:00
Sarah Hoffmann
28ee59dd64 test: drop template DB when something goes wrong during creation
Fixes #951.
2018-04-08 10:06:33 +02:00
Sarah Hoffmann
3fba5e7867 enable code coverage computation for API BDD tests
Fixes #505.
2017-07-17 22:59:13 +02:00
Sarah Hoffmann
49b5e4dbad adapt osm2pgsql tests for new address column 2017-04-08 18:58:26 +02:00
Sarah Hoffmann
e0c066d850 make sure the flatnode file is disabled while testing 2017-02-27 22:01:06 +01:00
Sarah Hoffmann
e1095205e4 fix geometry creation from scene 2017-02-26 16:46:41 +01:00
Sarah Hoffmann
6551399bcc test: enable grid support for DB tests 2017-02-26 16:46:41 +01:00
Sarah Hoffmann
e04838cc71 add node grids for tests and test for interpolation update 2017-02-26 16:46:41 +01:00
Sarah Hoffmann
b2be8c3ab7 move php tests in common test dir and unify READMEs 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
b9a58b8f24 add simple direct API search tests
API tests now no longer require a running Apache installation,
instead the website php scripts are called directly using the
appropriate enivronment.
2016-12-30 22:58:58 +01:00
Sarah Hoffmann
80a74181e4 add osm2pgsql update tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
f2debbef19 add simple osm2pgsql tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
c20f8b13a5 add simple db update tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
c594644aa7 add placex import tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
47f94c6988 simple search steps 2016-12-30 22:58:57 +01:00
Sarah Hoffmann
c56c09e2c0 rename and add basic tests 2016-12-30 22:58:57 +01:00