test: fix errors in mcp test
This commit is contained in:
parent
e211e66275
commit
3b8a607b5f
2 changed files with 11 additions and 10 deletions
3
.github/workflows/test_mcp.yml
vendored
3
.github/workflows/test_mcp.yml
vendored
|
|
@ -1,6 +1,9 @@
|
||||||
name: test | mcp
|
name: test | mcp
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- feature/cog-3543-remove-anything-codify-related-from-mcp-test
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ DEBUG = True
|
||||||
# Go through all Cognee search types
|
# Go through all Cognee search types
|
||||||
for search_type in SearchType:
|
for search_type in SearchType:
|
||||||
# Don't test these search types
|
# Don't test these search types
|
||||||
if search_type in [SearchType.NATURAL_LANGUAGE, SearchType.CYPHER]:
|
if search_type in [SearchType.NATURAL_LANGUAGE, SearchType.CYPHER, SearchType.TRIPLET_COMPLETION]:
|
||||||
break
|
break
|
||||||
try:
|
try:
|
||||||
async with self.mcp_server_session() as session:
|
async with self.mcp_server_session() as session:
|
||||||
|
|
@ -420,15 +420,13 @@ DEBUG = True
|
||||||
if invalid_result.content and len(invalid_result.content) > 0:
|
if invalid_result.content and len(invalid_result.content) > 0:
|
||||||
invalid_content = invalid_result.content[0].text
|
invalid_content = invalid_result.content[0].text
|
||||||
|
|
||||||
if "Invalid UUID format" in invalid_content:
|
assert("Invalid UUID format" in invalid_content)
|
||||||
self.test_results["delete_error_handling"] = {
|
self.test_results["delete_error_handling"] = {
|
||||||
"status": "PASS",
|
"status": "PASS",
|
||||||
"result": invalid_content,
|
"result": invalid_content,
|
||||||
"message": "delete error handling works correctly",
|
"message": "delete error handling works correctly",
|
||||||
}
|
}
|
||||||
print("✅ delete error handling test passed")
|
print("✅ delete error handling test passed")
|
||||||
else:
|
|
||||||
raise Exception(f"Expected UUID error not found: {invalid_content}")
|
|
||||||
else:
|
else:
|
||||||
raise Exception("Delete error test returned no content")
|
raise Exception("Delete error test returned no content")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue