Summary
All Cosmos live tests that read documents fail because the queried containers return empty result sets. The service responds correctly (200 Success) — there is simply no seed data in the live account/containers, so data assertions fail. This is a test-data / environment issue, not a code defect.
Failing live tests
Azure.Mcp.Tools.Cosmos.Tests.CosmosCommandTests (8):
Should_infer_container_schema
Should_text_search_documents
Should_text_search_documents_with_select_properties
Should_vector_search_documents
Should_vector_search_documents_with_select_properties
Should_list_recent_items
Should_get_item_by_id
Should_get_item_by_id_with_partition_key
Evidence
cosmos_database_container_schema_infer (database ToDoList, container Items):
{ "status": 200, "message": "Success",
"results": { "sampleSize": 0, "properties": [] } }
cosmos_database_container_item_text-search (container TextItems):
{ "status": 200, "message": "Success", "results": { "items": [] } }
Assert.Contains() Failure — Set: [] Not found: "text-1"
Analysis
Every failing call returns 200 Success with empty payloads (sampleSize: 0, empty items/properties). The test containers (ToDoList / Items / TextItems) contain no documents in the live environment.
Suggested fix
- Seed the Cosmos test containers as part of live-test setup (documents including the expected
text-1 item and vector data), or
- Gate these tests on the presence of seed data so an unseeded environment doesn't produce false failures.
Source
CI live-test run for Azure.Mcp.Tools.Cosmos: buildId 6555615
Summary
All Cosmos live tests that read documents fail because the queried containers return empty result sets. The service responds correctly (
200 Success) — there is simply no seed data in the live account/containers, so data assertions fail. This is a test-data / environment issue, not a code defect.Failing live tests
Azure.Mcp.Tools.Cosmos.Tests.CosmosCommandTests(8):Should_infer_container_schemaShould_text_search_documentsShould_text_search_documents_with_select_propertiesShould_vector_search_documentsShould_vector_search_documents_with_select_propertiesShould_list_recent_itemsShould_get_item_by_idShould_get_item_by_id_with_partition_keyEvidence
cosmos_database_container_schema_infer(databaseToDoList, containerItems):{ "status": 200, "message": "Success", "results": { "sampleSize": 0, "properties": [] } }cosmos_database_container_item_text-search(containerTextItems):{ "status": 200, "message": "Success", "results": { "items": [] } }Analysis
Every failing call returns
200 Successwith empty payloads (sampleSize: 0, emptyitems/properties). The test containers (ToDoList/Items/TextItems) contain no documents in the live environment.Suggested fix
text-1item and vector data), orSource
CI live-test run for
Azure.Mcp.Tools.Cosmos: buildId 6555615