test: replacing each DocumentStore specific tests and used the generalised ones from haystack.testing.document_store#2812
Conversation
anakin87
left a comment
There was a problem hiding this comment.
Left some minor comments.
Also, I think we can maybe safely avoid increasing haystack-ai pin:
- we would not force users to update to a newer Haystack version when their document store can already work with previous versions (we just changed tests)
- in the CI, the latest stable version will run in any case
- if we avoid changing pins, we can keep everything in this PR and don't worry about releasing new versions.
WDYT?
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
|
I'm probably missing something. If we don't increase the dependency on the latest haystack to at least 2.24, the tests will fail, since the new tests code is in this new release. |
By default, when pinning |
I was wrong because we also run unit tests with the lowest possible dependencies and this would make imports fail. |
anakin87
left a comment
There was a problem hiding this comment.
Looks good.
Thank you for the standardization work!
Related Issues
Proposed Changes:
DeleteDocumentsTest,UpdateByFilterTest, etc.) instead of custom duplicated tests across integrations.Total tests removed: 49, and 7 overrides tests added in Azure AI Search
delete_all_documents()so it doesn’t calldelete(ids=[])on an empty collection (avoids Chroma error when there are no docs)._eq/_neinfilters.py(e.g.true/falsein OData).update_by_filter_and_waitupdated to acceptmeta(andfields/kwargs) and pass the correct updates intoupdate_by_filter.How did you test it?
pytest integrations/<name>/tests/test_document_store.py).Notes for the reviewer
delete_all_documents,delete_by_filterandupdate_by_filtergeneric tests tohaystack.testing.document_storehaystack#10477 is merged inhaystackpyproject.tomlis using this branch test: adddelete_all_documents,delete_by_filterandupdate_by_filtergeneric tests tohaystack.testing.document_storehaystack#10477 - before this PR is approved those need to be updated to point to the latest haystack releaseChecklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.