From 2c8eb54d7b0a13359ddae3a0ff96f945bb8340ff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Dec 2025 06:56:14 +0000 Subject: [PATCH] Add test for edge case: verify regex doesn't match partial path segments Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com> --- apps/dokploy/__test__/utils/azure-ai-provider.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/dokploy/__test__/utils/azure-ai-provider.test.ts b/apps/dokploy/__test__/utils/azure-ai-provider.test.ts index b356e6ae4..93992521b 100644 --- a/apps/dokploy/__test__/utils/azure-ai-provider.test.ts +++ b/apps/dokploy/__test__/utils/azure-ai-provider.test.ts @@ -68,4 +68,14 @@ describe("Azure OpenAI URL Normalization", () => { // Should only strip the last /v1 expect(result).toBe("https://workspacename.openai.azure.com/openai/v1"); }); + + it("should not strip partial matches in path segments", () => { + const input = "https://workspacename.openai.azure.com/myopenai/v1service"; + const result = normalizeAzureUrl(input); + + // Should not modify paths that don't end with /openai/v1 or /v1 + expect(result).toBe( + "https://workspacename.openai.azure.com/myopenai/v1service", + ); + }); });