Unnecessary error on mongodb authentication. Skip checking
This commit is contained in:
parent
d2d602117f
commit
62178c26c9
|
@ -71,8 +71,7 @@ function MongoDB(s, schema, callback) {
|
|||
if (err) throw err;
|
||||
if (s.username && s.password) {
|
||||
t = this;
|
||||
client.authenticate(s.username, s.password, function(err, result) {
|
||||
if (err) throw err;
|
||||
client.authenticate(s.username, s.password, function (err, result) {
|
||||
t.client = client;
|
||||
schema.client = client;
|
||||
callback();
|
||||
|
@ -231,4 +230,4 @@ MongoDB.prototype.updateAttributes = function updateAttrs(model, id, data, cb) {
|
|||
|
||||
MongoDB.prototype.disconnect = function () {
|
||||
this.client.close();
|
||||
};
|
||||
};
|
||||
|
|
|
@ -37,11 +37,11 @@ if (process.env.ONLY && !testPerformed) {
|
|||
}
|
||||
|
||||
function performTestFor(schemaName) {
|
||||
testPerformed = true;
|
||||
context(schemaName, function () {
|
||||
var schema = new Schema(schemaName, schemas[schemaName] || {});
|
||||
|
||||
it('should connect to database', function (test) {
|
||||
testPerformed = true;
|
||||
if (schema.connected) return test.done();
|
||||
schema.on('connected', test.done);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue