remove redundant auth tests and connect with command line arguments
This commit is contained in:
parent
e5bcdc4542
commit
2a594b624d
@ -1,11 +0,0 @@
|
|||||||
var helper = require(__dirname + '/test-helper');
|
|
||||||
test('can log in with clear text password', function() {
|
|
||||||
helper.authConnect('user_pw', 'postgres', function(con) {
|
|
||||||
assert.raises(con, 'authenticationCleartextPassword', function() {
|
|
||||||
con.password('pass');
|
|
||||||
});
|
|
||||||
assert.raises(con, 'readyForQuery', function() {
|
|
||||||
con.end();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,16 +0,0 @@
|
|||||||
var helper = require(__dirname + '/test-helper');
|
|
||||||
|
|
||||||
test('can log in with md5 password', function() {
|
|
||||||
helper.authConnect('user_md5', 'postgres', function(con) {
|
|
||||||
|
|
||||||
assert.raises(con, 'authenticationMD5Password', function(msg) {
|
|
||||||
assert.ok(msg.salt);
|
|
||||||
var enc = Client.md5('ssap' + 'user_md5');
|
|
||||||
enc = Client.md5(enc + msg.salt.toString('binary'));
|
|
||||||
con.password('md5'+enc);
|
|
||||||
});
|
|
||||||
assert.raises(con, 'readyForQuery', function() {
|
|
||||||
con.end();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,8 +0,0 @@
|
|||||||
var helper = require(__dirname+'/test-helper');
|
|
||||||
test('can log in with no password', function() {
|
|
||||||
helper.authConnect(function(con) {
|
|
||||||
assert.raises(con, 'readyForQuery', function() {
|
|
||||||
con.end();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
Loading…
Reference in New Issue
Block a user