Skip to content

Commit

Permalink
Add test for no-verify string config option
Browse files Browse the repository at this point in the history
  • Loading branch information
brianc committed May 5, 2020
1 parent e9073f5 commit 1864910
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/pg/test/unit/client/configuration-tests.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 1864910

Please sign in to comment.