updated test & makefile to be more in line with other uses

This commit is contained in:
Brian Carlson 2011-02-23 20:19:27 -06:00
parent cda667df24
commit 569f760b5e
3 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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() {

View File

@ -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();