diff --git a/pyproject.toml b/pyproject.toml index 6460f30..ddd02b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -144,7 +144,6 @@ test = [ testing = [ "testcontainers<4", ] - [project.urls] changelog = "https://github.com/crate-workbench/cratedb-toolkit/blob/main/CHANGES.rst" documentation = "https://github.com/crate-workbench/cratedb-toolkit" @@ -155,6 +154,8 @@ cratedb-retention = "cratedb_toolkit.retention.cli:cli" cratedb-toolkit = "cratedb_toolkit.cli:cli" ctk = "cratedb_toolkit.cli:cli" migr8 = "cratedb_toolkit.io.mongodb.cli:main" +[project.entry-points.pytest11] +cratedb_service = "cratedb_toolkit.testing.pytest" [tool.black] line-length = 120 diff --git a/tests/conftest.py b/tests/conftest.py index 637e152..20d2550 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -55,7 +55,7 @@ def configure_database_schema(session_mocker, prune_environment): @pytest.fixture(scope="session") -def cratedb_service(): +def cratedb_custom_service(): """ Provide a CrateDB service instance to the test suite. """ @@ -67,12 +67,12 @@ def cratedb_service(): @pytest.fixture(scope="function") -def cratedb(cratedb_service): +def cratedb(cratedb_custom_service): """ Provide a fresh canvas to each test case invocation, by resetting database content. """ - cratedb_service.reset(tables=RESET_TABLES) - yield cratedb_service + cratedb_custom_service.reset(tables=RESET_TABLES) + yield cratedb_custom_service @pytest.fixture