Commit Graph

877 Commits

Author SHA1 Message Date
Sarah Hoffmann
2cb85e48b4 adapt test results to new ranking 2020-08-03 16:57:22 +02:00
marc tobias
01b009ff24 test/README.md - more instructions how to import test db 2020-07-31 16:50:27 +02:00
Sarah Hoffmann
9a204f6284 test: make road really cross the boundary 2020-07-26 15:57:07 +02:00
Sarah Hoffmann
6e4ee160ee adapt tests to new search ranks 2020-06-17 10:53:11 +02:00
Sarah Hoffmann
8218da27b3 adapt tests to new ranks 2020-05-23 19:40:41 +02:00
Sarah Hoffmann
aa4bd00631 Adapt boundary labels for Sweden and Norway
This also gives us the correct labels for address output in
json and xml.
2020-05-23 16:19:27 +02:00
Sarah Hoffmann
cadbdaff18 fix style 2020-05-18 22:20:36 +02:00
Sarah Hoffmann
57510f517a adapt tests to modified address types 2020-05-17 16:53:33 +02:00
Sarah Hoffmann
528fe6553f adapt php tests
Also fixes some errors found by the tests.
2020-05-17 16:46:45 +02:00
Simon Will
14dba39157 Use assertEqualsWithDelta for float comparisons
PHPUnit 7.3 introduced the functions assertEqualsWithDelta for comparing
floats with a delta. The old four-argument version of assertEquals is
deprecated in PHPUnit 8 and removed in PHPUnit 9.

This commit means that the tests will fail with PHPUnit < 7.3 because
assertEqualsWithDelta is not defined there.
2020-05-05 23:43:09 +02:00
Simon Will
43fd2a7423 Declare return type of testcase setUp method
PHPUnit 7 changed the signature of the TestCase methods to include the
return type.
2020-05-05 23:40:18 +02:00
Sarah Hoffmann
65ee7a8002
Merge pull request #1754 from mtmail/nominatim-db-tests-against-postgres
Nominatim::DB tests against separate postgresql database
2020-04-26 10:20:30 +02:00
marc tobias
a5d0657d9b lonvia PR feedback 2020-04-26 03:33:15 +02:00
Sarah Hoffmann
0b0349f746
Merge pull request #1752 from mtmail/new-oo-shell-class
new PHP Nominatim\Shell class to wrap shell escaping
2020-04-25 16:48:04 +02:00
Sarah Hoffmann
207efe700f highway:construction should appear as 'road' in the address list
Fixes #1763.
2020-04-22 09:08:33 +02:00
marc tobias
38c21de0ee Nominatim::DB tests against separate postgresql database 2020-04-13 18:01:37 +02:00
marc tobias
fc40939775 new PHP Nominatim\Shell class to wrap shell escaping 2020-04-12 03:50:40 +02:00
Sarah Hoffmann
ef47515420 make admin levels 3 and 7 distinct ones in addresses
There really is no need to conflate these two levels as they
are in use in various countries.

Also adds province as a distinct place.

Fixes #1736.
2020-04-10 22:58:11 +02:00
Sarah Hoffmann
98be5bf637 adapt tests to geocodejson format adaptions 2020-04-08 11:19:43 +02:00
Rahul
eb2d816f2a Added test cases for whitespaces in LatLon 2020-04-04 00:53:40 +05:30
Sarah Hoffmann
0d189ac5df
Merge pull request #1733 from krahulreddy/whitespaces-considered-as-single-space
Support whitespace characters(x09-x0d) as single space
2020-04-03 18:01:47 +02:00
K Rahul Reddy
7aa2df5389 Support whitespace characters(x09-x0d) as single space 2020-04-02 05:04:40 +05:30
Sarah Hoffmann
975ef0b305 re-add district to geocodejson 2020-04-01 21:24:42 +02:00
Sarah Hoffmann
8150c3602b add tests for geocodejson address fields 2020-04-01 11:14:48 +02:00
Sarah Hoffmann
19948c378a adapt tests to new borough ranking 2020-03-30 23:04:20 +02:00
marc tobias
7a94872413 remove polygon=1 (polypoints) feature 2020-03-29 21:58:11 +02:00
Sarah Hoffmann
d56c69dd01 adapt API tests to place linkage changes
The missing district is due to a data error for wikidata tags.
2020-03-25 11:38:31 +01:00
Sarah Hoffmann
78526a33b4 Remove linkees from search_name
Fixes #722
2020-03-04 11:36:39 +01:00
Sarah Hoffmann
6d431aebb7 linked centroids must always be within geometry
When using a linked place as centroid for a boundary, check
first that it is really within the area. If it is outside,
just keep the computed centroid because a centroid outside the
area just causes havok.

Fixes #1352.
2020-03-04 09:59:57 +01:00
Sarah Hoffmann
acd8ca2ebd add testing for rank adaption while linking 2020-02-28 15:22:48 +01:00
Sarah Hoffmann
06fdfad89e link against place nodes by place type
If a boundary relation has no label member preferably
link against a place node with the same place type.

Also inherit the rank_address from the place node (only
has an effect when linking via lable member or place type).
2020-02-28 15:22:48 +01:00
Sarah Hoffmann
00ca493f33 move linked place type into linked_place extratags
Using linked_place means that we don't overwrite any
place tags on the boundary. This is important when we
wanto to use the information for linking.
2020-02-28 15:22:48 +01:00
Sarah Hoffmann
5220a92be4 adapt API tests 2020-02-22 16:46:03 +01:00
marc tobias
7fd9d0eeef unit tests for ParameterParser::hasSetAny 2020-02-19 16:55:17 +01:00
Sarah Hoffmann
6073d948e6 fix duplicate keys in tests
The tests suddenly failed because the unique key constraint
is more strict and does no longer include the type.
2020-02-12 11:29:33 +01:00
marc tobias
932ac23f18 document how to extract subset of TIGER data needed for API tests 2020-02-11 18:50:27 +01:00
Sarah Hoffmann
3a3f9b3496 fix formatting 2020-02-09 16:57:55 +01:00
Sarah Hoffmann
c36fd72f99 use detailsPermaLink function on main website as well 2020-02-09 16:05:22 +01:00
Sarah Hoffmann
57ae3d03a1 return place_id link to details when not an OSM object
Stop-gap solution to find the right object for Tiger and
interpolation objects.
2020-02-09 15:45:38 +01:00
Sarah Hoffmann
4856f56d61 adapt test to change in hamlet classification 2020-01-23 22:26:47 +01:00
Sarah Hoffmann
d732dc3bb2 update place address levels
Adds province and allotments and downgrades hamlet.
2020-01-08 23:53:03 +01:00
Sarah Hoffmann
20d541af06 remove osm2pgsql tag tests
These tests are now part of the osm2pgsql test suite.
2020-01-04 16:23:29 +01:00
Sarah Hoffmann
f8bd4f5133 add test for finding housenumber 0 2019-12-01 20:36:59 +01:00
Sarah Hoffmann
bfe92ea191 bdd tests: enforce use of full import style 2019-12-01 16:25:39 +01:00
Sarah Hoffmann
9fed91a47f adapt tests for new wikipedia tables 2019-11-20 09:57:40 +01:00
Sarah Hoffmann
e0de838b13 adapt tests to short_name demotion 2019-10-28 22:53:41 +01:00
marc tobias
3af1520461 lookup endpoint returns boundingbox 2019-08-05 23:32:46 +02:00
Sarah Hoffmann
2bbe5017d4 use bbox of geometry when searching for attached streets
As we are doing a distance search, this improves results for
large places like airports.

Fixes #1442.
2019-07-28 13:28:27 +02:00
marc tobias
1560685020 lookup endpoint supports jsonv2 and geocodejson output now 2019-07-21 23:20:48 +02:00
Sarah Hoffmann
4c1793b4e3 recreate interpolations when one of their support nodes changes
A simple update is not enough because the interpolation splits
might change as well as the housenumbers.

Fixes #1360.
2019-07-03 23:15:54 +02:00
Sarah Hoffmann
cdc7d0fe0e remove visibility modifier from constants again
Only supported on PHP >= 7.1.
2019-07-02 23:24:49 +02:00
Sarah Hoffmann
e164d53fcc adapt tests to new place address ranks 2019-06-30 23:09:43 +02:00
Sarah Hoffmann
38a99856c0 Rework word set computation
Switch from an recursive algorithm for computing the word sets
to an iterative one that benefits from caching intermediate
results. This considerably reduces the amount of memory needed,
so that the depth restriction can be dropped. To ensure that
the number of word sets remains manageable, only sets up to
a certain length are accepted and only a certain number of
total word sets. If word sets need to be dropped, we drop
the ones with more words per word set first.

To further reduce the number of potential word sets, the valid
tokens are looked up first and then only word sets containing
valid tokens are computed.

Fixes #1403, #1404 and #654.
2019-06-29 18:22:31 +02:00
Sarah Hoffmann
2c21cbb5e6 update osm2pgsql (downgrading unnamed places)
Also adds tests for updating unnamed places.
2019-06-10 18:22:11 +02:00
Sarah Hoffmann
3bc4b4bf9f update osm2pgsql (import special tags) 2019-06-09 13:58:05 +02:00
Sarah Hoffmann
b612b99421
Merge pull request #1321 from mtmail/interpolating-0-housenumbers
Support housenumber=0 in interpolations
2019-04-19 18:29:43 +02:00
marc tobias
7d9dbd62c7 Support housenumber=0 in interpolations 2019-04-02 15:13:45 +02:00
marc tobias
c9a6350894 On postcode searches observe given bounded viewbox 2019-04-02 14:49:31 +02:00
Sarah Hoffmann
2a4198f94d add test for issue #1343
Keyword details for countries (which don't have address details).
2019-03-26 21:49:44 +01:00
marc tobias
890d415e1f Nominatim::DB support input variables, custom error messages 2019-03-10 16:56:36 +01:00
marc tobias
d4b633bfc5 replace database abstraction DB with PDO 2019-03-09 00:18:15 +01:00
Sarah Hoffmann
bdd64093e5
Merge pull request #1295 from mtmail/move-searchrank-labels-to-php
Remove get_addressrank_label. Move get_searchrank_label to PHP
2019-02-10 17:22:49 +01:00
marc tobias
3be797c759 BDD: support for DB_PORT environment variable 2019-02-09 20:54:18 +01:00
marc tobias
853b536394 Remove get_addressrank_label. Move get_searchrank_label to PHP 2019-02-09 20:38:36 +01:00
marc tobias
b56f7e8ad2 remove phpunit config key deprecated since version 3.5 2019-02-09 00:37:11 +01:00
Sarah Hoffmann
c822012aad ignore admin boundary ways for countries and states
Countries and states are mapped world-wide as relations by now.

Fixes #543 and #1291.
2019-01-26 13:37:10 +01:00
Sarah Hoffmann
e24ea7c1bb add tests for import of interpolations 2019-01-08 22:54:41 +01:00
Sarah Hoffmann
caa8210112 Switch to configurable style for osm2pgsql
Includes the full style, which is the same as now (minus
sidwalk exclusion) and a minimal style for boundaries only.
2019-01-08 22:54:41 +01:00
Sarah Hoffmann
cc17aa8d6b Remove postcodes also from word table when they no longer exist
Also adds tests for postcode updates.

Fixes #1273.
2019-01-04 23:11:47 +01:00
Sarah Hoffmann
d4fa528d5c
Merge pull request #1245 from lonvia/address-levels-from-json
Make rank assignments configurable
2018-12-01 21:43:53 +01:00
Sarah Hoffmann
52178caa98 fix tests 2018-11-28 23:40:17 +01:00
marc tobias
417b5b031b test/README.txt: BUILDDIR should be BUILD_DIR [SKIP CI] 2018-11-27 20:17:27 +01:00
Sarah Hoffmann
e10d11c6c7 Make rank assignments configurable
The initial search and address rank is saved in a table
that is set up from a json configuration file. Ranks may
be assigned on a country level according to class and
type of the object. Special handling that depends on the
geometry or OSM type is still hard-coded in placex insert.

The new default config file mimicks the current assignment
as close as possible. A couple of exceptions have been
removed, most notably the exception for Irish townlands.
2018-11-24 16:21:16 +01:00
Sarah Hoffmann
f0088ca2be
Merge pull request #1237 from ckquentvp/fix-accept-language-underscore-parsing
match languages such as ja_rm (or any other with underscore) properly
2018-11-24 16:20:00 +01:00
name
3cd3d1f5ae test languages with underscores (e.g. ja_rm) 2018-11-24 16:52:24 +02:00
Sarah Hoffmann
71ef94dae6 add Makefile for tests 2018-11-24 12:25:28 +01:00
Sarah Hoffmann
43c2eb383e Remove country and state nodes from address computation
OSM has by now almost complete coverage of admin
boundaries up to state level. Place nodes will do more
harm than good in this case.
2018-11-17 23:32:08 +01:00
Sarah Hoffmann
c84648c157 update osm2pgsql (restrict operator)
Fixes #1176.
2018-11-17 17:32:30 +01:00
marc tobias
aa41b813b8 2018 TIGER data conversion scripts, add documentation to /docs/data-sources 2018-11-15 23:01:08 +01:00
marc tobias
e4a51e460e set exception handler by request format, not always HTML 2018-10-03 22:58:20 +02:00
marc tobias
c73737f77f adjust BDD api test cases to 2018 test database 2018-09-28 18:46:35 +02:00
Sarah Hoffmann
09595697cc
Merge pull request #1189 from mtmail/classtypes-unit-tests
PHP unit tests for Nominatim\ClassTypes
2018-09-22 10:48:32 +02:00
marc tobias
f0daf11375 PHP unit tests for Nominatim\ClassTypes 2018-09-20 19:15:58 +02:00
marc tobias
e2a7a795d4 fix AddressDetails->getAddressDetails, add tests 2018-09-20 02:16:01 +02:00
marc tobias
a9bdac836c make PHP testsuite work with PHPUnit6 2018-09-15 15:23:10 +02:00
Sarah Hoffmann
a5d35d6e84 use namespaces for PHPUnit classes
This is mandatory for PHPUnit 6.x. Older versions provide a
forward compatibility layer, so we should be good.

Fixes #1150.
2018-08-25 14:57:31 +02:00
Sarah Hoffmann
84cfe5db53 fix warning in keyword output of details 2018-08-22 22:35:46 +02:00
Sarah Hoffmann
88374c2522 improve test coverage for reverse and debug output 2018-08-20 23:05:49 +02:00
Sarah Hoffmann
de8888ec58 directly do country search for reverse zoom < 5
Fixes #1145.
2018-08-20 22:09:08 +02:00
marc tobias
c7a4c2c88a test for SearchContext::setViewboxFromBox 2018-08-14 17:37:54 +02:00
Sarah Hoffmann
48d4ea5542 Do not have postcode node appear in addresses directly
Many of the postcode nodes are actually derived from
incomplete addresses and are as such not even centroids.
Better let them only take part in the address computation
via the postcode table.
2018-08-05 14:25:20 +02:00
Sarah Hoffmann
9bdbbec0c8
Merge pull request #1110 from lonvia/remove-address-check-for-long-lines
Remove special search for address part for long ways
2018-08-04 23:19:32 +02:00
Sarah Hoffmann
646fa53b44 improve place node search when no areas found
Only look for place nodes in a certain radius according
to the rank_search of the place node.
2018-08-04 21:51:23 +02:00
Sarah Hoffmann
713ea080d2 Remove special search for address part for long ways
Ways now always have the complete set of crossing boundaries
independent of the length.

Fixes #1108.
2018-07-22 15:05:45 +02: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
Marc Tobias Metten
0892eab1d3 tests for Nominatim::TokenList 2018-07-19 14:19:50 +02:00
Sarah Hoffmann
b17019a21c fix unit tests for class types 2018-07-12 23:59:29 +02:00
Sarah Hoffmann
be58b929f2 add tests for geocodejson and fix syntax errors 2018-07-12 22:00:18 +02:00
Sarah Hoffmann
f50f46c1ce Merge branch 'geojson-output' of https://github.com/mtmail/Nominatim into mtmail-geojson-output 2018-07-06 20:26:33 +02:00
Sarah Hoffmann
9955155ce0 update tests for off-coast reverse geocoding 2018-07-04 21:03:04 +02:00
Sarah Hoffmann
ac29f8bc91 Merge branch 'better-reverse' of https://github.com/gemo1011/Nominatim into gemo1011-better-reverse 2018-07-02 21:33:27 +02:00
gemo1011
796f069d74 test adjusting 2018-06-27 14:55:09 +02:00
gemo1011
7585d37818 edited test 2018-06-27 14:55:07 +02:00
Sarah Hoffmann
743ec43460 nearest place search should match any of given tokens not all
When multiple isin tokens are given, then these are duplicates
and it is enough that any one of them is found in the
name_vector.

Fixes #1056.
2018-06-14 00:11:19 +02:00
Marc Tobias Metten
7a964efb3a search/reverse/lookup with geojson,geocodejson output 2018-05-29 17:20:34 +02:00
Sarah Hoffmann
f29c7bf910 introduce classes for token list and token types 2018-05-14 23:04:15 +02:00
Marc Tobias Metten
8841a328c8 add PHPCS Squiz.Arrays.ArrayDeclaration.KeyNotAligned rule 2018-05-08 00:37:41 +02:00
mtmail
7075a5828e
add JSON format to /status endpoint (#1013)
add JSON format to /status endpoint
2018-05-04 23:37:48 +02:00
Marc Tobias Metten
a885e7309a PHP unit tests for DebugHtml 2018-05-03 22:19:19 +02:00
Sarah Hoffmann
5182da9f45 add tests for address tag parsing for search name 2018-04-15 22:52:42 +02:00
mtmail
3087ac1145
PHP code style: enforce long array initialisation (#1015) 2018-04-13 13:18:29 +02:00
marc tobias
31c7f25541 rename parentof to hierarchy and other lonvia Mar/29 PR feedback 2018-04-12 22:02:24 +02:00
Marc Tobias Metten
0eb71cdce8 only return polygon if &polygon_geojson=1 is set 2018-04-12 22:01:10 +02:00
Marc Tobias Metten
1e28f2478c details support json output 2018-04-12 22:01:10 +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
9a3bc9cc1e
Merge pull request #1010 from lonvia/ignore-unicode-format-characters
Ignore Unicode format characters for normalization
2018-04-10 23:48:58 +02:00
Sarah Hoffmann
6bd905ff43 update osm2pgsql (name:suffix)
Fixes #823.
2018-04-10 23:46:57 +02:00
Sarah Hoffmann
ae83ceab5e ignore Unicode format characters for normalization
Also adds tests.

Fixes #1007.
2018-04-10 22:48:17 +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
Marc Tobias Metten
1cb87164d9 NominatimTest.php => LibTest.php 2018-03-27 01:38:39 +02:00
Sarah Hoffmann
5c8fbe8186
Merge pull request #941 from mtmail/parameter-parser-tests2
PHP tests for ParameterParser
2018-03-06 23:25:20 +01:00
marc tobias
7fd46dcee9 ParameterParser: getSet default value doesnt have to be part of the set 2018-03-06 14:53:23 +01:00
marc tobias
3ef4c4fbe7 ParameterParser: getStringList removes empty strings 2018-03-06 14:51:48 +01:00
marc tobias
47258f40ea ParameterParser: getFloat with empty string value throws exception 2018-03-06 13:35:27 +01:00
marc tobias
123a3c0347 ParameterParser: getInt with empty string value throws exception 2018-03-06 13:33:19 +01:00
Marc Tobias Metten
d9cd8c6fff use assertSame to check array order, 0 vs false 2018-02-28 23:22:45 +01:00
Sarah Hoffmann
36fa21d7ce fix more behave table formatting errors 2018-02-26 23:41:57 +01:00
Sarah Hoffmann
2b66a7a39a test: fix format of behave table 2018-02-26 20:49:26 +01:00
Marc Tobias Metten
146779340c use setExpectedException to make sure exceptions are really thrown 2018-02-24 18:14:34 +01:00
Marc Tobias Metten
fd9345cda3 PHP tests for ParameterParser 2018-02-23 01:46:18 +01:00
Marc Tobias Metten
8a615ad969 phpcs fixes. Mostly spacing and single quotes 2018-02-23 01:16:01 +01:00
Edward Betts
7e00a6e2ff Correct spelling mistakes. 2018-02-18 13:11:35 +00:00
Sarah Hoffmann
c3483747eb reimport boundaries from scratch when type is changed
Fixes #895.
2018-02-12 21:19:27 +01:00
marc tobias
5042be1b72 parsing coordinates allows second with floats 2018-02-08 17:45:43 +01:00
Sarah Hoffmann
2cf1ff41c0 move nominatim.org links to https
Solves #737.
2018-01-10 23:21:21 +01:00
Sarah Hoffmann
35c7269bac when linking waterway ways and relations allow all river-like types
Fixes #848
2017-12-16 17:00:55 +01:00
Sarah Hoffmann
6c1977b448 replace double-quoting with single quotes where applicable 2017-10-26 21:40:33 +02:00
Marc Tobias Metten
185a983c9d tests for lib.php closestHouseNumber 2017-10-25 23:58:13 +02:00
Sarah Hoffmann
adbbb1ce02 restrict number of results for reverse queries
When given a coordinate off the coast of a large town, the entire
town may end up in the potential results during the reverse query.
Postgres then needs to sort tens of thousands of results before it
can determine the clostest one. Given that the results at such a
large search radius are bound to be imprecise anyway, restrict
the number of results postgres should consider to 1000.
2017-10-25 22:34:29 +02:00
Sarah Hoffmann
f78d094483 fix variable typo when filtering results
Fixes #830 and #832.
2017-10-25 20:25:23 +02:00
Sarah Hoffmann
7eeb79ce67 placex must not return a lookup housenumber 2017-10-25 20:11:51 +02:00
Sarah Hoffmann
1a4506f6ab use PlaceLookup in search 2017-10-23 23:30:53 +02:00
Sarah Hoffmann
5c18d6865d adapt unit tests to new Phrase class 2017-10-14 20:45:20 +02:00
Sarah Hoffmann
2c62a8dbbc adapt phpunit tests to new SearchContext class 2017-10-09 22:11:46 +02:00
Sarah Hoffmann
89c576fbe1 tests: more coverage for all API endpoints 2017-10-04 00:05:34 +02:00
Sarah Hoffmann
218b70fd96 test: remove road-fallback test from db tests
This should be tested in the api section.
2017-10-03 14:26:08 +02:00
Sarah Hoffmann
e3323e8888 fix search for postcode via structured query
Results from the artifical postcode table were dropped
when reevaluating rank of results.
2017-10-03 12:10:27 +02:00
Sarah Hoffmann
eacaf3489e more coverage tests for Geocode.php 2017-10-02 23:09:45 +02:00
Sarah Hoffmann
0d4c1e8460 fix viewbox related test
Coordinates are no longer specially ordered.
2017-10-02 20:39:33 +02:00
Sarah Hoffmann
28810e6ce0 Merge pull request #802 from mtmail/coordinate-extract-missing-first-minus-sign
NearPoint::extractFromQuery - greedy-match optional quote sign
2017-10-01 22:42:24 +02:00
marc tobias
06657b3e10 NearPoint::extractFromQuery - greedy-match optional quote sign 2017-09-21 19:13:50 +02:00
Sarah Hoffmann
81a7ea36db more API tests (mostly for user errors) 2017-09-19 23:06:31 +02:00
Sarah Hoffmann
af74c037f4 enable coverage also for tests with HTTP errors 2017-09-19 22:42:09 +02:00
marc tobias
e67a6dc321 fix to NearPoint::extractFromQuery handling first minus sign 2017-09-19 12:40:10 +01:00
Sarah Hoffmann
15a215729e fix handling of near queries with special search
Make sure to use the classtype tables with near search and
allow to search for arbitrary key/values (forbidding it
for viewbox searches).

Add tests for near queries.
2017-09-19 00:07:11 +02:00
Sarah Hoffmann
8eb066c692 reinstate key-value amenity search
Reenable search by the secret special term [key=value]
matching against the given main tag. Note that for most
cases that works only for tags that also have a special
search table.
2017-09-18 22:09:06 +02:00
Sarah Hoffmann
a0de20e9bc more API tests for code coverage
Also fixes two minor issues related to structured queries.
2017-09-17 23:30:08 +02:00
Sarah Hoffmann
2dbf58d461 improve code coverage documentation 2017-09-17 20:27:06 +02:00
Sarah Hoffmann
9aeb111fba tests: add new admin scene 2017-08-20 09:29:56 +02:00
Sarah Hoffmann
7ca5219297 fixup tests 2017-08-19 19:37:06 +02:00
Sarah Hoffmann
e55ac77c94 add simple tests for postcode import 2017-08-19 19:37:06 +02:00
Sarah Hoffmann
f9205caf22 adapt scene generation tool to newest libosmium 2017-08-19 19:37:06 +02:00
Sarah Hoffmann
ec8af1dd40 fix more tests 2017-08-19 19:37:06 +02:00
Sarah Hoffmann
50c5abf6bb fix API tests wrt postcodes 2017-08-19 19:37:06 +02:00
Sarah Hoffmann
a44377c7b0 fix postcode-related tests 2017-08-19 19:37:06 +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
9785aff76c restrict linked places to place nodes
Avoids getting the wrong entry when the linked place has
double tagging.

Fixes #573.
2017-06-07 21:32:02 +02:00
Sarah Hoffmann
5a5691b5b7 force update of linker when linkee is updates
Potential name changes need to be added to the linker's
name hstore.

Fixes #170.
2017-06-06 23:46:44 +02:00
Sarah Hoffmann
9848381a04 remove wip tags from all tests 2017-06-06 22:01:52 +02:00
Sarah Hoffmann
623d58b67e Remove boundries when downgrading from polygon to line
Fixes #135.
2017-06-06 21:59:36 +02:00
Sarah Hoffmann
6985abc3fd Merge pull request #745 from lonvia/restrict-poi-queries-results
limit number of considered places in POI queries
2017-06-06 20:55:15 +02:00
Sarah Hoffmann
c13094acfd limit number of considered places in POI queries
When searching for POIs in place_classtype_ tables limit the number
of objects considered to 300. The distinct and order by clauses
forced until now to retrive all matching objects and order them
first which can cause long running queries when retriving them
for large areas like the US.

Fixes #735.
2017-06-05 22:40:42 +02:00
Sarah Hoffmann
308bfcbf25 advertise official location for test data on nominatim.org 2017-06-05 22:01:42 +02:00
Sarah Hoffmann
de0ad657ba fix formatting in test README 2017-06-05 21:53:45 +02:00
Christian von Roques
b6be33cded explicitly name columns at INSERT 2017-04-18 13:36:02 +02:00
Sarah Hoffmann
050b0a2ced remove street and addr_place columns in placex
The information is onyl needed for parenting,
so no need to store it permanently.
2017-04-08 19:58:10 +02:00
Sarah Hoffmann
41afcaddd5 adapt more BDD tests to hstore 2017-04-08 19:58:09 +02:00
Sarah Hoffmann
8c7fa0213f fix DB bd tests for address hstore 2017-04-08 19:57:36 +02:00
Sarah Hoffmann
49b5e4dbad adapt osm2pgsql tests for new address column 2017-04-08 18:58:26 +02:00
Sarah Hoffmann
43eedfd253 abort osmline update correctly when way nodes are missing
Fixes #695.
2017-03-30 22:14:47 +02:00
Sarah Hoffmann
09f1661638 move moreURL computation into Geocode and include all params
Fixes #678.
2017-03-23 00:16:58 +01:00
Sarah Hoffmann
b3186d07f5 for roads add all intersecting boundaries to address list
When roads cross boundaries, both administrative entities should
be added to the address list, so that both entities can be used
for searching. Also allows in a second step to better sort out
addresses of POIs on such roads.

Fixes #121.
2017-03-18 12:17:48 +01:00
Sarah Hoffmann
57b35654e7 fix style 2017-03-17 22:36:22 +01:00
Sarah Hoffmann
20a4cab57e add tests for nearpoint sql functions 2017-03-16 22:12:20 +01:00
Sarah Hoffmann
1649191ffd adapt unit tests for new NearPoint type 2017-03-15 23:58:51 +01:00
Sarah Hoffmann
1aaeee19a1 test: rerun indexing after updates until really all is done
There are caess where indexing needs to be done a second round
because related objects need to be updated.
2017-03-11 17:09:14 +01:00
Edward Betts
7e3af2debc correct spelling mistakes 2017-03-08 15:06:50 +00:00
Sarah Hoffmann
450a12c6be include housenumbers and postcodes when rechecking for exact matches 2017-02-28 21:40:05 +01:00
Sarah Hoffmann
e0c066d850 make sure the flatnode file is disabled while testing 2017-02-27 22:01:06 +01:00
Sarah Hoffmann
e1cbca2572 add behave settings
removes @Fail tests
2017-02-26 16:46:41 +01:00
Sarah Hoffmann
e1095205e4 fix geometry creation from scene 2017-02-26 16:46:41 +01:00
Sarah Hoffmann
e5c79a1d1f add more interpolation update scenarios (currently failing) 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
c48fb88e6b move interpolaton computation into indexing step
The interpolaton computation needs information from the osm2pgsql
slim tables which may not be available when the data is inserted.

Insertion now only adds a line with basic address information to
location_property_osmline. The line is then split during the
indexing, leading to more lines (which are complete in that case)
being inserted.

Fixes #598.
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
c897b96c41 don't delete names on unknown country boundaries
If a country boundary has a country_code that is unknown to
Nominatim, it would delete all names because the coalascing
with country_name would not yield any result.
2017-02-18 13:51:21 +01:00
Marc Tobias Metten
cfd03d7be3 Replace lettuce with behave in tests. Use python3 Split import and (python,php) tests into two travis executions 2017-01-21 02:38:04 +01:00
Sarah Hoffmann
08d1ec09cc fix viewbox tests
Hamburg may not be complete in the test set
2017-01-09 21:15:41 +01:00
Sarah Hoffmann
d18bd14045 add test for moreURL issue and debugging of test query contents 2017-01-01 17:58:21 +01:00
Sarah Hoffmann
c0e4a74c71 add mention of required Tiger files for test database 2016-12-30 23:15: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
5252051291 add source files for test database 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
ccaea09a65 move scenes directory to new test directory 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
b2c1d086b5 add api tests for language, details and lookup 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
3a787df934 add remaining reverse tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
635ce30db5 add simple reverse API tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
201f618cc7 finish search API tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
81922fc057 more API search tests
also move directory name back to api
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
b75aadfb6b more backslash tests 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
6f4f19004c add remianing osm2pgsql import tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
e2f23e391b add osm2pgsql broken data 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
21a3fc4b0f add remaining db update tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
0e9e2bbdca add tests for updating linked features 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
4f2d73aa7c add tests for interpolation updates 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
7f4e7a2579 add interpolation tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
82a0e23265 tests for linking 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
e36e485698 add naming tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
ddb7296663 add parenting tests 2016-12-30 22:58:58 +01:00
Sarah Hoffmann
604706a827 ad search_name import 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
Sarah Hoffmann
65bf6dbff7 environment for behave tests 2016-12-30 22:58:57 +01:00