Skip to content
Snippets Groups Projects
Commit e64d64e4 authored by David Douard's avatar David Douard
Browse files

pytest_plugin: use the stock pytest_postgresql postgresql factory

instead of swh-core's postgresql_fact one, since we actually do not
use its custom features any more in swh-storage.
parent a936cfda
No related branches found
No related tags found
1 merge request!793pytest_plugin: use the stock pytest_postgresql postgresql factory
# Copyright (C) 2019-2021 The Software Heritage developers # Copyright (C) 2019-2022 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution # See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version # License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information # See top-level LICENSE file for more information
...@@ -9,7 +9,7 @@ from os import environ ...@@ -9,7 +9,7 @@ from os import environ
import pytest import pytest
from pytest_postgresql import factories from pytest_postgresql import factories
from swh.core.db.pytest_plugin import initialize_database_for_module, postgresql_fact from swh.core.db.pytest_plugin import initialize_database_for_module
from swh.storage import get_storage from swh.storage import get_storage
from swh.storage.postgresql.db import Db as StorageDb from swh.storage.postgresql.db import Db as StorageDb
from swh.storage.tests.storage_data import StorageData from swh.storage.tests.storage_data import StorageData
...@@ -18,7 +18,6 @@ environ["LC_ALL"] = "C.UTF-8" ...@@ -18,7 +18,6 @@ environ["LC_ALL"] = "C.UTF-8"
swh_storage_postgresql_proc = factories.postgresql_proc( swh_storage_postgresql_proc = factories.postgresql_proc(
dbname="storage",
load=[ load=[
partial( partial(
initialize_database_for_module, initialize_database_for_module,
...@@ -29,7 +28,9 @@ swh_storage_postgresql_proc = factories.postgresql_proc( ...@@ -29,7 +28,9 @@ swh_storage_postgresql_proc = factories.postgresql_proc(
) )
swh_storage_postgresql = postgresql_fact("swh_storage_postgresql_proc") swh_storage_postgresql = factories.postgresql(
"swh_storage_postgresql_proc",
)
@pytest.fixture @pytest.fixture
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment