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:
arc53-machine committed 2026-09-28 19:47:28 +01:00
1 parent 473e8ec15c
commit 324d54ea67
5 files changed
+48 -8

No files matched your search

+10
View File
@@ -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__)