test(integration): run the body upload disconnect test on a private database

Ports only the tests/integration/observability/test_guardrail_effects.py hunk of #49310. The test asserts the only spend row is its own control call, so on the shared worker database it picked up rows other tests wrote

(cherry picked from commit fbd126e518)
This commit is contained in:
yuneng-jiang 2026-11-10 15:16:26 -08:00 • committed by Yuneng Jiang
parent f0f514b8bd
commit 379fdec1b3
No known key found for this signature in database

View file

@ -22,7 +22,7 @@ import yaml
from integration._support.client import Gateway, eventually, object_value
from integration._support.database import read_rows
from integration._support.mcp import mcp_peer, register_mcp, tool_names
from integration._support.process import OwnedProxy, owned_proxy, owned_proxy_process
from integration._support.process import OwnedProxy, OwnedState, owned_proxy, owned_proxy_process
from integration._support.wire import Reply, Request, Wire, wire_server
from integration._support.ports import allocate_port
from openai import AsyncOpenAI, OpenAI
@ -2972,7 +2972,10 @@ def test_client_disconnect_during_the_body_upload_runs_no_endpoint_and_writes_no
with (
wire_server(_openai_upstream) as upstream,
owned_proxy_process(
gateway, tmp_path, {"OPENAI_BASE_URL": upstream.url + "/v1", "OPENAI_API_KEY": "synthetic-openai-key"}
gateway,
tmp_path,
{"OPENAI_BASE_URL": upstream.url + "/v1", "OPENAI_API_KEY": "synthetic-openai-key"},
state=OwnedState.PRIVATE,
) as owned,
owned.gateway.scenario() as scenario,
):