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

tests: use stock pytest_postgresql factory function

instead of (soon-to-be-deprecated) swh-core's postgresql_fact one.
parent b7b7927e
No related branches found
No related tags found
1 merge request!151tests: use stock pytest_postgresql factory function
......@@ -11,7 +11,7 @@ import pkg_resources.extern.packaging.version
import pytest
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.vault import get_vault
from swh.vault.backend import VaultBackend
......@@ -35,13 +35,12 @@ if pytest_v < pkg_resources.extern.packaging.version.parse("3.9"):
vault_postgresql_proc = factories.postgresql_proc(
dbname="vault",
load=[
partial(initialize_database_for_module, "vault", VaultBackend.current_version)
],
)
postgres_vault = postgresql_fact("vault_postgresql_proc")
postgres_vault = factories.postgresql("vault_postgresql_proc")
@pytest.fixture
......
......@@ -24,7 +24,7 @@ import pytest
from pytest import param
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.model.from_disk import DentryPerms
from swh.model.model import (
Content,
......@@ -47,7 +47,6 @@ from swh.vault.cookers.git_bare import GitBareCooker
from swh.vault.in_memory_backend import InMemoryVaultBackend
storage_postgresql_proc = factories.postgresql_proc(
dbname="storage",
load=[
partial(
initialize_database_for_module, "storage", StorageBackend.current_version
......@@ -55,7 +54,7 @@ storage_postgresql_proc = factories.postgresql_proc(
],
)
storage_postgresql = postgresql_fact("storage_postgresql_proc", no_db_drop=True)
storage_postgresql = factories.postgresql("storage_postgresql_proc")
@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