X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2bab0ca060ff224091b20a0ac808a3febaba04b1..c70dfccacac90a90bfc193f49262abe7505d7d75:/test/python/tools/test_check_database.py diff --git a/test/python/tools/test_check_database.py b/test/python/tools/test_check_database.py index 886bd75b..66506f56 100644 --- a/test/python/tools/test_check_database.py +++ b/test/python/tools/test_check_database.py @@ -2,7 +2,7 @@ # # This file is part of Nominatim. (https://nominatim.org) # -# Copyright (C) 2024 by the Nominatim developer community. +# Copyright (C) 2025 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for database integrity checks. @@ -12,6 +12,7 @@ import pytest from nominatim_db.tools import check_database as chkdb import nominatim_db.version + def test_check_database_unknown_db(def_config, monkeypatch): monkeypatch.setenv('NOMINATIM_DATABASE_DSN', 'pgsql:dbname=fjgkhughwgh2423gsags') assert chkdb.check_database(def_config) == 1 @@ -35,6 +36,7 @@ def test_check_database_version_good(property_table, temp_db_conn, def_config): str(nominatim_db.version.NOMINATIM_VERSION)) assert chkdb.check_database_version(temp_db_conn, def_config) == chkdb.CheckState.OK + def test_check_database_version_bad(property_table, temp_db_conn, def_config): property_table.set('database_version', '3.9.9-9') assert chkdb.check_database_version(temp_db_conn, def_config) == chkdb.CheckState.FATAL