X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/28ee59dd643e4582ade1aa8fd6a788f0a4daf69e..0bbc25c9c5c3ab644d6771ccbd87f26c3d7552bf:/test/bdd/environment.py diff --git a/test/bdd/environment.py b/test/bdd/environment.py index 90c75724..162346de 100644 --- a/test/bdd/environment.py +++ b/test/bdd/environment.py @@ -122,6 +122,9 @@ class NominatimEnvironment(object): def setup_api_db(self, context): self.write_nominatim_config(self.api_test_db) + def setup_unknown_db(self, context): + self.write_nominatim_config('UNKNOWN_DATABASE_NAME') + def setup_db(self, context): self.setup_template_db() self.write_nominatim_config(self.test_db) @@ -151,7 +154,8 @@ class NominatimEnvironment(object): self.run_nominatim_script('update', *args, **kwargs) def run_nominatim_script(self, script, *args, **kwargs): - cmd = [os.path.join(self.build_dir, 'utils', '%s.php' % script)] + cmd = ['/usr/bin/env', 'php', '-Cq'] + cmd.append(os.path.join(self.build_dir, 'utils', '%s.php' % script)) cmd.extend(['--%s' % x for x in args]) for k, v in kwargs.items(): cmd.extend(('--' + k.replace('_', '-'), str(v))) @@ -260,6 +264,8 @@ def before_scenario(context, scenario): context.nominatim.setup_db(context) elif 'APIDB' in context.tags: context.nominatim.setup_api_db(context) + elif 'UNKNOWNDB' in context.tags: + context.nominatim.setup_unknown_db(context) context.scene = None def after_scenario(context, scenario):