From c59d8c504742d0457b215ae4b6cfc60a67b67595 Mon Sep 17 00:00:00 2001 From: Varsha Date: Wed, 3 Sep 2025 00:59:16 -0700 Subject: [PATCH] fix: Fix mock vector DB schema in Qdrant tests (#3295) # What does this PR do? Fix: https://github.com/llamastack/llama-stack/issues/3293 ## Test Plan ``` ===================================================== test session starts ===================================================== platform darwin -- Python 3.12.11, pytest-7.4.4, pluggy-1.5.0 -- /Users/vnarsing/miniconda3/envs/stack-client/bin/python cachedir: .pytest_cache metadata: {'Python': '3.12.11', 'Platform': 'macOS-14.7.7-arm64-arm-64bit', 'Packages': {'pytest': '7.4.4', 'pluggy': '1.5.0'}, 'Plugins': {'asyncio': '0.23.8', 'cov': '6.0.0', 'timeout': '2.2.0', 'socket': '0.7.0', 'xdist': '3.8.0', 'html': '3.1.1', 'langsmith': '0.3.39', 'anyio': '4.8.0', 'metadata': '3.0.0'}} rootdir: /Users/vnarsing/go/src/github/meta-llama/llama-stack configfile: pyproject.toml plugins: asyncio-0.23.8, cov-6.0.0, timeout-2.2.0, socket-0.7.0, xdist-3.8.0, html-3.1.1, langsmith-0.3.39, anyio-4.8.0, metadata-3.0.0 asyncio: mode=Mode.AUTO collected 3 items tests/unit/providers/vector_io/test_qdrant.py::test_qdrant_adapter_returns_expected_chunks[2-2] PASSED [ 33%] tests/unit/providers/vector_io/test_qdrant.py::test_qdrant_adapter_returns_expected_chunks[100-60] PASSED [ 66%] tests/unit/providers/vector_io/test_qdrant.py::test_qdrant_register_and_unregister_vector_db PASSED [100%] ``` Co-authored-by: Francisco Arceo --- tests/unit/providers/vector_io/test_qdrant.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/providers/vector_io/test_qdrant.py b/tests/unit/providers/vector_io/test_qdrant.py index d7900dbfd..aab5b6f45 100644 --- a/tests/unit/providers/vector_io/test_qdrant.py +++ b/tests/unit/providers/vector_io/test_qdrant.py @@ -54,7 +54,9 @@ def mock_vector_db(vector_db_id) -> MagicMock: mock_vector_db.identifier = vector_db_id mock_vector_db.embedding_dimension = 384 mock_vector_db.model_dump_json.return_value = ( - '{"identifier": "' + vector_db_id + '", "embedding_model": "embedding_model", "embedding_dimension": 384}' + '{"identifier": "' + + vector_db_id + + '", "provider_id": "qdrant", "embedding_model": "embedding_model", "embedding_dimension": 384}' ) return mock_vector_db