made connection tests not use wrong version of client

This commit is contained in:
brianc 2011-03-04 20:07:20 +00:00
parent c1b5fe2ab0
commit e4a9abd0ec

View File

@ -19,8 +19,10 @@ var connect = function(callback) {
con.password(helper.args.password); con.password(helper.args.password);
}); });
con.once('authenticationMD5Password', function(msg){ con.once('authenticationMD5Password', function(msg){
var inner = Client.md5(helper.args.password+helper.args.user); //need js client even if native client is included
var outer = Client.md5(inner + msg.salt.toString('binary')); var client = require(__dirname +"/../../../lib/client");
var inner = client.md5(helper.args.password+helper.args.user);
var outer = client.md5(inner + msg.salt.toString('binary'));
con.password("md5"+outer); con.password("md5"+outer);
}); });
con.once('readyForQuery', function() { con.once('readyForQuery', function() {