enable BDD tests for sqlite databases

The database must currently be created by hand and the name handed
in via -DAPI_TEST_DB='sqlite:...'.
This commit is contained in:
Sarah Hoffmann
2023-10-13 21:32:03 +02:00
parent 8216899a9a
commit d8dca2a3a9
18 changed files with 41 additions and 11 deletions

View File

@@ -46,7 +46,10 @@ def before_all(context):
def before_scenario(context, scenario):
if 'DB' in context.tags:
if not 'SQLITE' in context.tags \
and context.config.userdata['API_TEST_DB'].startswith('sqlite:'):
context.scenario.skip("Not usable with Sqlite database.")
elif 'DB' in context.tags:
context.nominatim.setup_db(context)
elif 'APIDB' in context.tags:
context.nominatim.setup_api_db()