test(mcp): assert the misconfigured credential message on fail-closed rejections

Co-Authored-By: bot_apk <apk@cognition.ai>
This commit is contained in:
Devin AI 2026-09-19 00:50:00 +00:00
parent f83992f786
commit e3755a88e7

View file

@ -7,12 +7,11 @@ import pytest
import yaml
from hypothesis import strategies as st
from hypothesis.stateful import RuleBasedStateMachine, invariant, rule, run_state_machine_as_test
from integration._support.client import Gateway
from integration._support.database import read_rows
from integration._support.generation import LIFECYCLE_SETTINGS, bounded_http_requests
from integration._support.process import owned_proxy
from integration._support.mcp import call_tool, mcp_peer, register_mcp, tool_names
from integration._support.process import owned_proxy
@pytest.mark.covers("mcp.call_tool.saved_headers.reach_actual_transport")
@ -199,6 +198,7 @@ def test_warm_credential_removal_rejects_without_upstream_traffic(gateway: Gatew
else call_tool(gateway, key, identity, names["add"], {"a": 3, "b": 5})
)
assert rejected.status_code == 500, rejected.text
assert "requires a usable upstream credential" in rejected.text, rejected.text
assert peer.drain() == (), "missing static credential escaped to upstream"
changed = gateway.request(
"PUT",