diff --git a/Makefile b/Makefile index e204526a..15dc732e 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ params := -u $(user) --password $(password) -p $(port) -d $(database) -h $(host) node-command := xargs -n 1 -I file node file $(params) -.PHONY : test test-connection test-integration bench test-libpg build +.PHONY : test test-connection test-integration bench test-native build test: test-unit test-all: test-unit test-integration @@ -28,8 +28,8 @@ test-unit: test-connection: @node script/test-connection.js $(params) -test-libpg: build test-unit - @find test/integration/client -name "*-tests.js" | $(node-command) --libpg true +test-native: build + @find test/native -name "*-tests.js" | $(node-command) test-integration: test-connection @find test/integration -name "*-tests.js" | $(node-command) diff --git a/test/native/connection-tests.js b/test/native/connection-tests.js index 1c9bc851..64a5e373 100644 --- a/test/native/connection-tests.js +++ b/test/native/connection-tests.js @@ -11,7 +11,7 @@ test('connecting with wrong parameters', function() { }); test('connects', function() { - var con = new Client("tcp://postgres:1234@127.0.0.1:5432/postgres"); + var con = new Client(helper.connectionString()); con.connect(); assert.emits(con, 'connect', function() { test('disconnects', function() { diff --git a/test/native/evented-api-tests.js b/test/native/evented-api-tests.js index 735647f1..5d04c3a6 100644 --- a/test/native/evented-api-tests.js +++ b/test/native/evented-api-tests.js @@ -1,6 +1,6 @@ var helper = require(__dirname + "/../test-helper"); var Client = require(__dirname + "/../../lib/native").Client; -var conString = "tcp://postgres:1234@127.0.0.1:5432/postgres"; +var conString = helper.connectionString(); test('connects', function() { var client = new Client(conString); client.connect();