test(pass-through): grant allowed_passthrough_routes so langfuse auth=true test reaches rpm path

#29256 made auth=true pass-through routes deny-by-default unless the key/team
has allowed_passthrough_routes configured, but this integration test was not
updated. The test key had no allowlist, so the auth=true parametrizations
(rpm_limit=0 -> expect 429, rpm_limit=2 -> expect 207) now hit the 403 gate in
auth before reaching the rpm/forwarding logic they mean to exercise.

Grant the test key allowed_passthrough_routes for /api/public/ingestion so it
clears the gate. Also removes a latent order-dependency: the case only passed
locally when an earlier (auth=false) parametrization registered the route first;
under worker isolation (CI xdist) it failed with 403.
This commit is contained in:
Yuneng Jiang 2026-06-25 23:48:21 -07:00
parent 52e5b3ae98
commit 432d99f3ee
No known key found for this signature in database

View file

@ -402,7 +402,9 @@ async def test_aaapass_through_endpoint_pass_through_keys_langfuse(
mock_api_key = "sk-my-test-key"
cache_value = UserAPIKeyAuth(
token=hash_token(mock_api_key), rpm_limit=rpm_limit
token=hash_token(mock_api_key),
rpm_limit=rpm_limit,
metadata={"allowed_passthrough_routes": ["/api/public/ingestion"]},
)
_cohere_api_key = os.environ.get("COHERE_API_KEY")