Skip to content

Commit 282f385

Browse files
committed
Try again...
1 parent fc8d735 commit 282f385

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/pg/test/unit/client/password-callback-tests.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ suite.test('password callback is called with conenction params', async function
3131
user: 'foo',
3232
database: 'bar',
3333
host: 'baz',
34-
password: async () => {
34+
password: async (params) => {
35+
assert.equal(params.user, 'foo')
36+
assert.equal(params.database, 'bar')
37+
assert.equal(params.host, 'baz')
3538
wait.done(10)
3639
return 'password'
3740
},
@@ -47,7 +50,7 @@ suite.test('password callback is called with conenction params', async function
4750
suite.test('cleartext password auth does not crash with null password using pg-pass', async function () {
4851
process.env.PGPASSFILE = `${__dirname}/pgpass.file`
4952
// set this to undefined so pgpass will use the file
50-
process.env.PGPASSWORD = undefined
53+
delete process.env.PGPASSWORD
5154
const wait = new Wait()
5255
console.log()
5356
console.log('hit hit hit')
@@ -66,7 +69,6 @@ suite.test('cleartext password auth does not crash with null password using pg-p
6669
database: 'bar',
6770
user: 'baz',
6871
password: (params) => {
69-
console.log('in password callback')
7072
return new Promise((resolve) => {
7173
pgpass(params, (pass) => {
7274
console.log('in pgpass callback. read password:', pass)

0 commit comments

Comments
 (0)