mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Add test for no-verify string config option
This commit is contained in:
parent
e9073f5a00
commit
1864910778
@ -1,5 +1,6 @@
|
||||
'use strict'
|
||||
require(__dirname + '/test-helper')
|
||||
var assert = require('assert')
|
||||
|
||||
var pguser = process.env['PGUSER'] || process.env.USER
|
||||
var pgdatabase = process.env['PGDATABASE'] || process.env.USER
|
||||
@ -43,6 +44,11 @@ test('client settings', function () {
|
||||
assert.equal(client.ssl, true)
|
||||
})
|
||||
|
||||
test('ssl no-verify', function () {
|
||||
var client = new Client({ ssl: 'no-verify' })
|
||||
assert.deepStrictEqual(client.ssl, { rejectUnauthorized: false })
|
||||
})
|
||||
|
||||
test('custom ssl force off', function () {
|
||||
var old = process.env.PGSSLMODE
|
||||
process.env.PGSSLMODE = 'prefer'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user