updated test & makefile to be more in line with other uses
This commit is contained in:
parent
cda667df24
commit
569f760b5e
6
Makefile
6
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)
|
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: test-unit
|
||||||
|
|
||||||
test-all: test-unit test-integration
|
test-all: test-unit test-integration
|
||||||
@ -28,8 +28,8 @@ test-unit:
|
|||||||
test-connection:
|
test-connection:
|
||||||
@node script/test-connection.js $(params)
|
@node script/test-connection.js $(params)
|
||||||
|
|
||||||
test-libpg: build test-unit
|
test-native: build
|
||||||
@find test/integration/client -name "*-tests.js" | $(node-command) --libpg true
|
@find test/native -name "*-tests.js" | $(node-command)
|
||||||
|
|
||||||
test-integration: test-connection
|
test-integration: test-connection
|
||||||
@find test/integration -name "*-tests.js" | $(node-command)
|
@find test/integration -name "*-tests.js" | $(node-command)
|
||||||
|
@ -11,7 +11,7 @@ test('connecting with wrong parameters', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('connects', 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();
|
con.connect();
|
||||||
assert.emits(con, 'connect', function() {
|
assert.emits(con, 'connect', function() {
|
||||||
test('disconnects', function() {
|
test('disconnects', function() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
var helper = require(__dirname + "/../test-helper");
|
var helper = require(__dirname + "/../test-helper");
|
||||||
var Client = require(__dirname + "/../../lib/native").Client;
|
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() {
|
test('connects', function() {
|
||||||
var client = new Client(conString);
|
var client = new Client(conString);
|
||||||
client.connect();
|
client.connect();
|
||||||
|
Loading…
Reference in New Issue
Block a user