1- 'use strict'
21const helper = require ( './test-helper' )
32const assert = require ( 'assert' )
43const suite = new helper . Suite ( )
54const pgpass = require ( 'pgpass' )
6- const fs = require ( 'fs' )
75
86class Wait {
97 constructor ( ) {
@@ -52,17 +50,6 @@ suite.test('cleartext password auth does not crash with null password using pg-p
5250 // set this to undefined so pgpass will use the file
5351 delete process . env . PGPASSWORD
5452 const wait = new Wait ( )
55- console . log ( )
56- console . log ( 'hit hit hit' )
57- console . log ( 'PGPASSFILE' , process . env . PGPASSFILE )
58- // check if file exists
59- if ( ! fs . existsSync ( process . env . PGPASSFILE ) ) {
60- throw new Error ( 'PGPASSFILE does not exist' )
61- }
62- // print the contents of the file
63- console . log ( 'contents of the file:' , fs . readFileSync ( process . env . PGPASSFILE , 'utf8' ) )
64- // print the mode of the file
65- console . log ( 'stats of the file:' , fs . statSync ( process . env . PGPASSFILE ) )
6653 const client = helper . client ( {
6754 host : 'foo' ,
6855 port : 5432 ,
@@ -71,7 +58,6 @@ suite.test('cleartext password auth does not crash with null password using pg-p
7158 password : ( params ) => {
7259 return new Promise ( ( resolve ) => {
7360 pgpass ( params , ( pass ) => {
74- console . log ( 'in pgpass callback. read password:' , pass )
7561 wait . done ( 10 )
7662 resolve ( pass )
7763 } )
0 commit comments