Skip to content

Commit

Permalink
Move nucliadb tests to ndbfixtures (#2859)
Browse files Browse the repository at this point in the history
* First steps, nucliadb conftest depends on ndbf. conftest

* Massive migration to ndbfixtures

- Annotate all tests with deploy_modes("standalone") mark
- Replace nucliadb_manager by nucliadb_reader_manager or nucliadb_writer_manager
- replace nucliadb_grpc by nucliadb_ingest_grpc

* Typing party

* No more nucliadb_manager fixture

* Add missing deploy_mode marks

* Remove duplicated fixture: shard_manager

* Remove duplicated fixture: stream_audit

* Predict mock and dummy to common ndbfixtures

* Remove unused fixture

* Move semi-duplicated pinecone fixtures to its integration tests

* Port nuclaidb train grpc (standalone) to ndbfixtures

* Remove unneeded marks

* Move txn to legacy ndbfixtures module

* Fixing warnings: pydantic, ignores types...

* Final move from nucliadb fixtures to ndbfixture

- Rename widely used knowledgebox fixture to standalone_knowledgebox

* Remove tests.fixtures from ingest conftest
  • Loading branch information
jotare authored Feb 10, 2025
1 parent 59275db commit 91de7ac
Show file tree
Hide file tree
Showing 60 changed files with 1,474 additions and 1,298 deletions.
2 changes: 1 addition & 1 deletion nucliadb/src/nucliadb/writer/api/v1/export_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def kb_create_and_import_endpoint(request: Request):
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
import_kb_config = KnowledgeBoxConfig(
title=f"Imported KB - {now}",
learning_configuration=learning_config.dict(),
learning_configuration=learning_config.model_dump(),
)
kbid, slug = await create_kb(import_kb_config)

Expand Down
3 changes: 3 additions & 0 deletions nucliadb/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
"tests.ndbfixtures.processing",
# useful resources for tests (KBs, resources, ...)
"tests.ndbfixtures.resources",
"tests.nucliadb.knowledgeboxes",
# legacy fixtures waiting for a better place
"tests.ndbfixtures.legacy",
]
)

Expand Down
Loading

0 comments on commit 91de7ac

Please sign in to comment.