Skip to content

Commit c3aebe7

Browse files
pmalouincharmander
authored andcommitted
Apply suggestions from code review
Co-authored-by: Charmander <[email protected]>
1 parent 1bc03de commit c3aebe7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: packages/pg-connection-string/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ Query parameters follow a `?` character, including the following special query p
8787
* `host=<host>` - sets `host` property, overriding the URL's host
8888
* `encoding=<encoding>` - sets the `client_encoding` property
8989
* `ssl=1`, `ssl=true`, `ssl=0`, `ssl=false` - sets `ssl` to true or false, accordingly
90-
* `sslmode=<sslmode>`
90+
* `sslmode=<sslmode>`
9191
* `sslmode=disable` - sets `ssl` to false
92-
* `sslmode=no-verify`, `sslmode=prefer`, - sets `ssl` to `{ rejectUnauthorized: false }`
93-
* `sslmode=require`, - sets `ssl` to `{ rejectUnauthorized: false }` unless `sslrootcert` is specified, in which case it behaves like `verify-ca`
94-
* `sslmode=verify-ca` - sets `ssl` to `{ checkServerIdentity: no-op}` (verify CA, but not server identity)
92+
* `sslmode=no-verify`, `sslmode=prefer` - sets `ssl` to `{ rejectUnauthorized: false }`
93+
* `sslmode=require` - sets `ssl` to `{ rejectUnauthorized: false }` unless `sslrootcert` is specified, in which case it behaves like `verify-ca`
94+
* `sslmode=verify-ca` - sets `ssl` to `{ checkServerIdentity: no-op }` (verify CA, but not server identity)
9595
* `sslmode=verify-full` - sets `ssl` to `{}` (verify CA and server identity)
9696
* `sslcert=<filename>` - reads data from the given file and includes the result as `ssl.cert`
9797
* `sslkey=<filename>` - reads data from the given file and includes the result as `ssl.key`

Diff for: packages/pg-connection-string/test/parse.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ describe('parse', function () {
275275
var connectionString = 'pg:///?sslmode=verify-ca'
276276
var subject = parse(connectionString)
277277
subject.ssl.should.have.property('checkServerIdentity').that.is.a('function')
278-
expect(subject.ssl.checkServerIdentity()).be.undefined
278+
expect(subject.ssl.checkServerIdentity()).to.be.undefined
279279
})
280280

281281
it('configuration parameter sslmode=verify-full', function () {
@@ -289,7 +289,7 @@ describe('parse', function () {
289289
var subject = parse(connectionString)
290290
subject.ssl.should.have.property('ca', 'example ca\n')
291291
subject.ssl.should.have.property('checkServerIdentity').that.is.a('function')
292-
expect(subject.ssl.checkServerIdentity()).be.undefined
292+
expect(subject.ssl.checkServerIdentity()).to.be.undefined
293293
})
294294

295295
it('allow other params like max, ...', function () {

0 commit comments

Comments
 (0)