mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-18 05:35:26 +02:00
Add test for edge case: verify regex doesn't match partial path segments
Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com>
This commit is contained in:
@@ -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",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user