mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-25 16:03:13 +00:00
Fixes: https://github.com/brianc/node-postgres/issues/2307 Fixes: https://github.com/brianc/node-postgres/issues/2004
25 lines
436 B
JavaScript
25 lines
436 B
JavaScript
'use strict'
|
|
|
|
const pg = require('../../../lib')
|
|
const helper = require('../test-helper')
|
|
|
|
const suite = new helper.Suite()
|
|
|
|
suite.test('bad ssl credentials do not cause crash', (done) => {
|
|
const config = {
|
|
ssl: {
|
|
ca: 'invalid_value',
|
|
key: 'invalid_value',
|
|
cert: 'invalid_value',
|
|
},
|
|
}
|
|
|
|
const client = new pg.Client(config)
|
|
|
|
client.connect((err) => {
|
|
assert(err)
|
|
client.end()
|
|
done()
|
|
})
|
|
})
|