change test to work on travis

This commit is contained in:
Hannes Hörl 2014-01-05 18:26:42 +01:00
parent 7fd79a41c3
commit caffda67f2

View File

@ -66,7 +66,13 @@ test('application_name has precedence over fallback_application_name', function(
test('application_name from connection string', function(){
var appName = 'my app';
var conf = 'postgres:///?application_name='+appName;
var conParams = require(__dirname + '/../../../lib/connection-parameters');
var conf;
if (process.argv[2]) {
conf = new conParams(process.argv[2]+'/?application_name='+appName);
} else {
conf = 'postgres://?application_name='+appName;
}
getAppName(conf, function(res){
assert.strictEqual(res, appName);
});