fix(postgres): align SSL mode behavior
This commit is contained in:
1 parent
97e3bf912e
commit
c40683431b
7 files changed
+298
-37
No files matched your search
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user