mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 22:15:10 +00:00
Validate configs on the existing-connection path; MCP policy fails closed
- Creating a tool from an existing connection validates its config too; the connection supplies the secrets the request leaves out. - When the connector policies cannot be read, the MCP test and save routes answer 503 instead of contacting the server.
This commit is contained in:
1 parent
473e8ec15c
commit
324d54ea67
5 files changed
+48
-8
No files matched your search
@@ -7,6 +7,16 @@ import pytest
|
||||
from flask import Flask
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _mcp_servers_allowed():
|
||||
"""The admin switch fails closed without a database; these tests are not about it.
|
||||
|
||||
The policy itself is covered in ``tests/connectors``.
|
||||
"""
|
||||
with patch("docsgpt.api.user.tools.mcp._mcp_policy_error", return_value=None):
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def app():
|
||||
return Flask(__name__)
|
||||
|
||||
Reference in new issue
Block a user