mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-25 16:03:13 +00:00
* Remove assert from globals * Remove Client from globals * Remove global test function * Remove MemoryStream from globals * Require assert in SASL integration tests * Attempt to use a postgres with ssl? * Use latest image * Remove connection tests - they test internals that are better covered by testint the client
26 lines
469 B
JavaScript
26 lines
469 B
JavaScript
'use strict'
|
|
|
|
const pg = require('../../../lib')
|
|
const helper = require('../test-helper')
|
|
const assert = require('assert')
|
|
|
|
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()
|
|
})
|
|
})
|