mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
restore the tokenizer directory when missing
Automatically repopulate the tokenizer/ directory with the PHP stub and the postgresql module, when the directory is missing. This allows to switch working directories and in particular run the service from a different maschine then where it was installed. Users still need to make sure that .env files are set up correctly or they will shoot themselves in the foot. See #2515.
This commit is contained in:
@@ -63,13 +63,13 @@ class TestFactory:
|
||||
assert tokenizer.init_state == "loaded"
|
||||
|
||||
|
||||
def test_load_no_tokenizer_dir(self):
|
||||
def test_load_repopulate_tokenizer_dir(self):
|
||||
factory.create_tokenizer(self.config)
|
||||
|
||||
self.config.project_dir = self.config.project_dir / 'foo'
|
||||
self.config.project_dir = self.config.project_dir
|
||||
|
||||
with pytest.raises(UsageError):
|
||||
factory.get_tokenizer_for_db(self.config)
|
||||
factory.get_tokenizer_for_db(self.config)
|
||||
assert (self.config.project_dir / 'tokenizer').exists()
|
||||
|
||||
|
||||
def test_load_missing_property(self, temp_db_cursor):
|
||||
|
||||
Reference in New Issue
Block a user