add unit tests for new check_database code

This commit is contained in:
Sarah Hoffmann
2021-02-18 20:36:11 +01:00
parent b169e4c88c
commit a0ae4945cd
3 changed files with 97 additions and 2 deletions

View File

@@ -154,6 +154,7 @@ def check_placex_size(conn, config): # pylint: disable=W0613
return CheckState.OK if cnt > 0 else CheckState.FATAL
@_check(hint="""\
The Postgresql extension nominatim.so was not correctly loaded.
@@ -198,13 +199,12 @@ def check_indexing(conn, config): # pylint: disable=W0613
# Likely just an interrupted update.
index_cmd = 'nominatim index'
else:
# Looks like the import process got interupted.
# Looks like the import process got interrupted.
index_cmd = 'nominatim import --continue indexing'
return CheckState.FAIL, dict(count=cnt, index_cmd=index_cmd)
@_check(hint="""\
The following indexes are missing:
{indexes}