The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(e2e): cover team update persistence via /team/info (#33997)
Yassin Kortameb27447a1d77
diff --git a/tests/e2e/management/management_client.py b/tests/e2e/management/management_client.pyindex 0f1d6dff524..e263a4da186 100644--- a/tests/e2e/management/management_client.py+++ b/tests/e2e/management/management_client.py@@ -41,6 +41,7 @@ from models import (TeamMemberEntry,TeamNewBody,TeamNewResponse,+ TeamUpdateBody,UserDeleteBody,UserInfoParams,UserInfoResponse,@@ -138,6 +139,28 @@ class ManagementClient:self._wait_for_team(team_id)return team_id+ def update_team(self, body: TeamUpdateBody) -> None:+ last: Result[NoBody] | None = None+ for attempt in range(5):+ last = self.proxy.transport.post(+ "/team/update",+ headers=self.proxy.transport.master,+ json=body,+ response_type=NoBody,+ )+ match last:+ case Success():+ return+ case UnknownApiError(body=body_text) if (+ "connecting to redis" in body_text.lower() or "name resolution" in body_text.lower()+ ):+ time.sleep(0.5 * (attempt + 1))+ continue+ case _:+ break+ assert last is not None+ raise AssertionError(last)+def delete_team(self, team_id: str) -> None:_ = self.proxy.transport.post("/team/delete",diff --git a/tests/e2e/management/test_management_e2e.py b/tests/e2e/management/test_management_e2e.pyindex f9a03015a95..fe6c4ef0e22 100644--- a/tests/e2e/management/test_management_e2e.py+++ b/tests/e2e/management/test_management_e2e.py@@ -23,7 +23,7 @@ from management_client import (ROUTE_NOT_ALLOWED_MARKER,ManagementClient,)-from models import KeyGenerateBody, OrgNewBody, TagListEntry, TagNewBody, TeamNewBody, UserNewBody, LiteLLMParamsBody, ModelInfoEntry+from models import KeyGenerateBody, OrgNewBody, TagListEntry, TagNewBody, TeamNewBody, TeamUpdateBody, UserNewBody, LiteLLMParamsBody, ModelInfoEntrypytestmark = pytest.mark.e2e@@ -227,6 +227,17 @@ class TestTeamRoutes:f"key generated under team {team_id} carries team_id {key_info.team_id!r} in /key/info")+ @pytest.mark.covers("mgmt.team.update.persists")+ def test_update_persists_to_team_info(self, client: ManagementClient, resources: ResourceManager) -> None:+ team_id = _create_team(client, resources, f"e2e-mgmt-team-{unique_marker()}", ["gemini-2.5-flash"])++ updated_alias = f"e2e-mgmt-team-updated-{unique_marker()}"+ client.update_team(TeamUpdateBody(team_id=team_id, team_alias=updated_alias))++ def reflected() -> bool | None:+ return True if client.team_info(team_id).team_alias == updated_alias else None++ _ = _poll(client, reflected, f"/team/info never reflected team_alias {updated_alias!r} after /team/update")@pytest.mark.covers("mgmt.team.list.happy_path")def test_created_team_appears_in_team_list(self, client: ManagementClient, resources: ResourceManagerdiff --git a/tests/e2e/models.py b/tests/e2e/models.pyindex f200df323bd..0df952d9960 100644--- a/tests/e2e/models.py+++ b/tests/e2e/models.py@@ -625,6 +625,11 @@ class TeamNewResponse(BaseModel):team_id: str+class TeamUpdateBody(BaseModel):+ team_id: str+ team_alias: str++class TeamInfoParams(BaseModel):team_id: str