File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 11SHELL := /bin/bash
22
3- connectionString =pg://postgres:5432@localhost/postgres
3+ connectionString =pg://
44
55params := $(connectionString )
66
77node-command := xargs -n 1 -I file node file $(params )
88
99.PHONY : test test-connection test-integration bench test-native build/default/binding.node
10+
11+ help :
12+ echo " make test-all connectionString=pg://<your connection string>"
13+
1014test : test-unit
1115
1216test-all : test-unit test-integration test-native test-binary
Original file line number Diff line number Diff line change 1- var config = require ( __dirname + '/../lib/utils' ) . parseConnectionString ( process . argv [ 2 ] )
1+ var config = { } ;
2+ if ( process . argv [ 2 ] ) {
3+ config = require ( __dirname + '/../lib/utils' ) . parseConnectionString ( process . argv [ 2 ] ) ;
4+ }
5+ //TODO use these environment variables in lib/ code
6+ //http://www.postgresql.org/docs/8.4/static/libpq-envars.html
7+ config . host = config . host || process . env [ 'PGHOST' ] || process . env [ 'PGHOSTADDR' ] ;
8+ config . port = config . port || process . env [ 'PGPORT' ] ;
9+ config . database = config . database || process . env [ 'PGDATABASE' ] ;
10+ config . user = config . user || process . env [ 'PGUSER' ] ;
11+ config . password = config . password || process . env [ 'PGPASSWORD' ] ;
212
313for ( var i = 0 ; i < process . argv . length ; i ++ ) {
414 switch ( process . argv [ i ] . toLowerCase ( ) ) {
You can’t perform that action at this time.
0 commit comments