From aa0ae610c6075fdaf9f1790a4ad8ec090a74ebd9 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 11 May 2022 15:33:01 +0200 Subject: [PATCH] avoid calling OSM servers during bdd tests --- test/bdd/steps/nominatim_environment.py | 3 ++- test/bdd/steps/steps_db_ops.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/bdd/steps/nominatim_environment.py b/test/bdd/steps/nominatim_environment.py index 70a03e6e..9bf182bc 100644 --- a/test/bdd/steps/nominatim_environment.py +++ b/test/bdd/steps/nominatim_environment.py @@ -184,7 +184,8 @@ class NominatimEnvironment: fd.flush() self.run_nominatim('import', '--osm-file', fd.name, '--osm2pgsql-cache', '1', - '--ignore-errors') + '--ignore-errors', + '--offline', '--index-noanalyse') except: self.db_drop_database(self.template_db) raise diff --git a/test/bdd/steps/steps_db_ops.py b/test/bdd/steps/steps_db_ops.py index 4c711b72..5ce416b0 100644 --- a/test/bdd/steps/steps_db_ops.py +++ b/test/bdd/steps/steps_db_ops.py @@ -95,7 +95,8 @@ def import_and_index_data_from_place_table(context): """ context.nominatim.run_nominatim('refresh', '--functions') context.nominatim.run_nominatim('import', '--continue', 'load-data', - '--index-noanalyse', '-q') + '--index-noanalyse', '-q', + '--offline') check_database_integrity(context) -- 2.39.5