fix(postgres): align SSL mode behavior

This commit is contained in:
t8y2 committed 2026-07-18 00:11:21 +08:00
1 parent 97e3bf912e
commit c40683431b
7 files changed
+298 -37

No files matched your search

+9
View File
@@ -42,6 +42,15 @@ test("postgres MCP URL maps ssl-mode to sslmode", () => {
assert.equal(url, "postgres://postgres:secret@pg.example.com:5432/app?sslmode=require");
});
test("postgres MCP URL normalizes direct sslmode aliases", () => {
const url = buildConnectionUrl(postgresConfig({ url_params: "sslmode=verify_identity" }), {
host: "pg.example.com",
port: 5432,
});
assert.equal(url, "postgres://postgres:secret@pg.example.com:5432/app?sslmode=verify-full");
});
test("postgres MCP URL drops MySQL-style TLS params", () => {
const url = buildConnectionUrl(
postgresConfig({