Skip to content

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]

test(e2e): drop redundant SCIM key cleanup, the throwaway db is the teardown

Yuneng Jiang94f6827530b6
diff --git a/tests/e2e/ui/tests/settings/scim.spec.ts b/tests/e2e/ui/tests/settings/scim.spec.ts
index 5489111a580..d7dd4248f50 100644
--- a/tests/e2e/ui/tests/settings/scim.spec.ts
+++ b/tests/e2e/ui/tests/settings/scim.spec.ts
@@ -2,7 +2,6 @@ import { test, expect, Page as PlaywrightPage } from "@playwright/test";
import { ADMIN_STORAGE_PATH } from "../../constants";
import { Page } from "../../fixtures/pages";
import { navigateToPage } from "../../helpers/navigation";
-import { masterKey } from "../../helpers/traffic";
const rootPath = (): string => process.env.SERVER_ROOT_PATH ?? "";
@@ -26,13 +25,11 @@ test.describe("Admin Settings - SCIM", () => {
test.use({ storageState: ADMIN_STORAGE_PATH });
test("Create SCIM Token shows the token once and offers to create another", async ({ page }) => {
- const token = await createScimTokenViaUi(page, `e2e-scim-ui-${Date.now()}`);
+ await createScimTokenViaUi(page, `e2e-scim-ui-${Date.now()}`);
await page.getByRole("button", { name: "Create Another Token" }).click();
await expect(page.getByRole("button", { name: "Create SCIM Token" })).toBeVisible();
await expect(page.getByText(/copy this token now/i)).toBeHidden();
-
- await deleteKey(page, token);
});
test("a UI-minted SCIM token authorizes the SCIM API", async ({ page, request }) => {
@@ -52,15 +49,5 @@ test.describe("Admin Settings - SCIM", () => {
const body = await res.json();
expect(body.schemas, "SCIM answers with a ListResponse").toContain("urn:ietf:params:scim:api:messages:2.0:ListResponse");
expect(Array.isArray(body.Resources), "SCIM ListResponse carries a Resources array").toBe(true);
-
- await deleteKey(page, token);
});
});
-
-async function deleteKey(page: PlaywrightPage, key: string): Promise<void> {
- const res = await page.request.post(`${rootPath()}/key/delete`, {
- headers: { Authorization: `Bearer ${masterKey()}`, "Content-Type": "application/json" },
- data: { keys: [key] },
- });
- expect(res.ok(), `cleanup of the SCIM token failed (${res.status()})`).toBe(true);
-}