File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed
Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ var people = [
3232]
3333
3434var con = new pg . Client ( {
35+ host : args . host ,
36+ port : args . port ,
3537 user : args . user ,
3638 password : args . password ,
3739 database : args . database
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ var connect = function(callback) {
99 console . log ( error ) ;
1010 throw new Error ( "Connection error" ) ;
1111 } ) ;
12- con . connect ( '5432' , 'localhost' ) ;
12+ con . connect ( helper . args . port || '5432' , helper . args . host || 'localhost' ) ;
1313 con . once ( 'connect' , function ( ) {
1414 con . startup ( {
1515 user : username ,
Original file line number Diff line number Diff line change 1- require ( __dirname + '/../test-helper' ) ;
1+ var helper = require ( __dirname + '/../test-helper' ) ;
22var Connection = require ( 'connection' ) ;
33var makeClient = function ( ) {
44 var connection = new Connection ( { stream : "no" } ) ;
@@ -9,7 +9,7 @@ var makeClient = function() {
99 } ;
1010 connection . queries = [ ] ;
1111 var client = new Client ( { connection : connection } ) ;
12- client . connect ( ) ;
12+ client . connect ( helper . args . port , helper . args . host ) ;
1313 client . connection . emit ( 'connect' ) ;
1414 return client ;
1515} ;
Original file line number Diff line number Diff line change @@ -23,3 +23,5 @@ createClient = function() {
2323 client . connect ( ) ;
2424 return client ;
2525} ;
26+
27+ module . exports = helper ;
You can’t perform that action at this time.
0 commit comments