use a frozen DB for API tests

This way we also test that dropping does the right thing.
This commit is contained in:
Sarah Hoffmann 2021-02-17 22:35:27 +01:00
parent 153dbb71b8
commit a60c34bded
2 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,7 @@ if ($sOsmType && $iOsmId > 0) {
// Be nice about our error messages for broken geometry
if (!$sPlaceId) {
if (!$sPlaceId && $oDB->tableExists('import_polygon_error')) {
$sSQL = 'SELECT ';
$sSQL .= ' osm_type, ';
$sSQL .= ' osm_id, ';

View File

@ -182,6 +182,7 @@ class NominatimEnvironment:
try:
self.run_setup_script('all', osm_file=self.api_test_file)
self.run_setup_script('import-tiger-data')
self.run_setup_script('drop')
phrase_file = str((testdata / 'specialphrases_testdb.sql').resolve())
run_script(['psql', '-d', self.api_test_db, '-f', phrase_file])