Skip to content

Commit

Permalink
fixed tests and updated package and history to 2.0.32
Browse files Browse the repository at this point in the history
  • Loading branch information
christkv committed May 18, 2015
1 parent acde0c2 commit 9566365
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 36 deletions.
4 changes: 2 additions & 2 deletions HISTORY.md
@@ -1,8 +1,8 @@
2.0.32
2.0.32 05-19-2015
-----------------
- NODE-463 db.close immediately executes its callback.
- Don't only emit server close event once (Issue #1276, https://github.com/vkarpov15).
- NODE-464 Updated mongodb-core to 1.1.29 that uses a single socket connection to arbiters and hidden servers.
- NODE-464 Updated mongodb-core to 1.1.31 that uses a single socket connection to arbiters and hidden servers as well as emitting all event correctly.

2.0.31 05-08-2015
-----------------
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "mongodb",
"version": "2.0.31",
"version": "2.0.32",
"description": "MongoDB legacy driver emulation layer on top of mongodb-core",
"main": "index.js",
"repository": {
Expand All @@ -13,7 +13,7 @@
"legacy"
],
"dependencies": {
"mongodb-core": "1.1.29"
"mongodb-core": "1.1.31"
, "readable-stream": "1.0.31"
},
"devDependencies": {
Expand Down
60 changes: 30 additions & 30 deletions test/functional/authentication_tests.js
Expand Up @@ -270,21 +270,21 @@ exports['Unordered bulk operation should fail correctly when not authenticated']
}
}

/**********************************************************************************************
// /**********************************************************************************************

ReplsetRep ReplsetRepl tReplsetRe etRepl Repl t plsetReplse eplsetReplse
setReplsetR setReplsetRe setReplset plsetR plsetRepls tReplsetRepl etReplsetRep
pls pls epls plse epls pls epl etRep etRe lset setR pls Rep et
tReplsetRe tRe etReplsetRe et plset epl set
lsetRepls lsetRe plsetRepls pl Repls etRepl epl
ReplsetR Replset tReplsetR tR Repls plsetRe et
setReplse setRepl lse lse etRe tReplse pls
epl Rep e epl Rep tRep Re lset lse tRe
etR setRep etRe tRe set set se epls Repl Repl epl lse
eplse eplset eplsetR plse Replse tReplsetRep etReplsetR lsetRep setR etRepls
etRep tRep etReplsetRep setRep lsetReplset plsetRepl ReplsetRepls plsetRe
// ReplsetRep ReplsetRepl tReplsetRe etRepl Repl t plsetReplse eplsetReplse
// setReplsetR setReplsetRe setReplset plsetR plsetRepls tReplsetRepl etReplsetRep
// pls pls epls plse epls pls epl etRep etRe lset setR pls Rep et
// tReplsetRe tRe etReplsetRe et plset epl set
// lsetRepls lsetRe plsetRepls pl Repls etRepl epl
// ReplsetR Replset tReplsetR tR Repls plsetRe et
// setReplse setRepl lse lse etRe tReplse pls
// epl Rep e epl Rep tRep Re lset lse tRe
// etR setRep etRe tRe set set se epls Repl Repl epl lse
// eplse eplset eplsetR plse Replse tReplsetRep etReplsetR lsetRep setR etRepls
// etRep tRep etReplsetRep setRep lsetReplset plsetRepl ReplsetRepls plsetRe

**********************************************************************************************/
// **********************************************************************************************/

var replSetManager;

Expand Down Expand Up @@ -342,7 +342,7 @@ exports['Should correctly handle replicaset master stepdown and stepup without l
// Connect
new Db('replicaset_test_auth', replSet, {w:1}).open(function(err, db) {
// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "admin", "root", "root");
replSetManager.setCredentials("default", "admin", "root", "root");
// Add a user
db.admin().addUser("root", "root", {w:4, wtimeout: 25000}, function(err, result) {
// test.equal(null, err);
Expand Down Expand Up @@ -408,7 +408,7 @@ exports.shouldCorrectlyAuthenticateUsingPrimary = {
// test.equal(null, err);

// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "node-native-test", "me", "secret");
replSetManager.setCredentials("default", "node-native-test", "me", "secret");

// Close the connection
db.close();
Expand Down Expand Up @@ -473,7 +473,7 @@ exports.shouldCorrectlyAuthenticateWithTwoSeeds = {

db.addUser("me", "secret", {w:4, wtimeout: 25000}, function(err, result) {
// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "node-native-test", "me", "secret");
replSetManager.setCredentials("default", "node-native-test", "me", "secret");

// Close the connection
db.close();
Expand Down Expand Up @@ -541,7 +541,7 @@ exports.shouldCorrectlyAuthenticateWithOnlySecondarySeed = {
p_db.close();

// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "admin", "me", "secret");
replSetManager.setCredentials("default", "admin", "me", "secret");

// connection string
var config = f("mongodb://me:secret@localhost:%s/node-native-test?authSource=admin&readPreference=secondary&replicaSet=%s&maxPoolSize=1"
Expand Down Expand Up @@ -639,7 +639,7 @@ exports.shouldCorrectlyAuthenticateWithMultipleLoginsAndLogouts = {
// test.ok(result != null);

// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "admin", "me", "secret");
replSetManager.setCredentials("default", "admin", "me", "secret");

db.collection("stuff", function(err, collection) {
collection.insert({a:2}, {w: 3}, authenticate1);
Expand Down Expand Up @@ -774,15 +774,15 @@ exports.shouldCorrectlyAuthenticateAndEnsureIndex = {

db_p.admin().addUser("me", "secret", {w:4}, function runWhatever(err, result) {
// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "admin", "me", "secret");
replSetManager.setCredentials("default", "admin", "me", "secret");

db_p.admin().authenticate("me", "secret", function(err, result) {
test.equal(null, err);

db_p.addUser('test', 'test', {w:4, wtimeout:25000}, function(err, result) {

// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "admin", "test", "test");
replSetManager.setCredentials("default", "admin", "test", "test");

db_p.authenticate('test', 'test', function(err, replies) {

Expand Down Expand Up @@ -847,15 +847,15 @@ exports.shouldCorrectlyAuthenticateAndUseReadPreference = {

db_p.admin().addUser("me", "secret", {w:4, wtimeout:25000}, function runWhatever(err, result) {
// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "admin", "me", "secret");
replSetManager.setCredentials("default", "admin", "me", "secret");

db_p.admin().authenticate("me", "secret", function(err, result) {
test.equal(null, err);

db_p.addUser('test', 'test', {w:4, wtimeout:25000}, function(err, result) {

// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "admin", "test", "test");
replSetManager.setCredentials("default", "admin", "test", "test");

db_p.authenticate('test', 'test', function(err, replies) {
test.equal(null, err);
Expand Down Expand Up @@ -910,7 +910,7 @@ exports.shouldCorrectlyBringReplicasetStepDownPrimaryAndStillReadFromSecondary =
test.ok(db_p != null);
db_p.admin().addUser("me", "secret", {w:4, wtimeout:25000}, function runWhatever(err, result) {
// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "admin", "me", "secret");
replSetManager.setCredentials("default", "admin", "me", "secret");

db_p.admin().authenticate("me", "secret", function(err, result) {
test.equal(null, err);
Expand All @@ -922,7 +922,7 @@ exports.shouldCorrectlyBringReplicasetStepDownPrimaryAndStillReadFromSecondary =
test.equal(null, err);
test.ok(result != null);

db.serverConfig.on('joined', function(t) {
db.serverConfig.on('joined', function(t, s) {
if(t == 'primary') {
var counter = 1000;
var errors = 0;
Expand All @@ -948,7 +948,7 @@ exports.shouldCorrectlyBringReplicasetStepDownPrimaryAndStillReadFromSecondary =
}
}
});
db.serverConfig.on('left', function(t) {
db.serverConfig.on('left', function(t, s) {
});
// Step down the primary
replSetManager.stepDown({force:true}, function(err, result) {
Expand Down Expand Up @@ -996,7 +996,7 @@ exports.shouldCorrectlyAuthWithSecondaryAfterKillPrimary = {
test.equal(null, err);

// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "test", "me", "secret");
replSetManager.setCredentials("default", "test", "me", "secret");

db_p.collection('test').insert({a:1}, {w:1}, function(err, result) {
test.equal(null, err);
Expand Down Expand Up @@ -1073,7 +1073,7 @@ exports.shouldCorrectlyAuthAgainstReplicaSetAdminDbUsingMongoClient = {

db_p.admin().addUser("me", "secret", {w:4, wtimeout:25000}, function runWhatever(err, result) {
// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "admin", "me", "secret");
replSetManager.setCredentials("default", "admin", "me", "secret");

db_p.close();

Expand Down Expand Up @@ -1142,7 +1142,7 @@ exports.shouldCorrectlyAuthAgainstNormalDbUsingMongoClient = {

db_p.addUser("me", "secret", {w:4, wtimeout: 25000}, function runWhatever(err, result) {
// Just set auths for the manager to handle it correctly
replSetManager.setCredentials("mongocr", "admin", "me", "secret");
replSetManager.setCredentials("default", "admin", "me", "secret");

db_p.close();

Expand Down Expand Up @@ -1275,7 +1275,7 @@ exports['should correctly connect and authenticate against admin database using

db.addUser("me", "secret", {w:'majority'}, function(err, result) {
// Just set auths for the manager to handle it correctly
shardedManager.setCredentials("mongocr", "node-native-test", "me", "secret");
shardedManager.setCredentials("default", "node-native-test", "me", "secret");

// Close the connection
db.close();
Expand Down Expand Up @@ -1340,7 +1340,7 @@ exports['Should correctly handle replicaset master stepdown and stepup without l
db.addUser("me", "secret", {w:'majority'}, function(err, result) {

// Just set auths for the manager to handle it correctly
shardedManager.setCredentials("mongocr", "admin", "me", "secret");
shardedManager.setCredentials("default", "admin", "me", "secret");

// Close the connection
db.close();
Expand Down
2 changes: 0 additions & 2 deletions test/functional/db_tests.js
Expand Up @@ -137,10 +137,8 @@ exports.shouldCorrectlyHandleFailedConnection = {
test: function(configuration, test) {
var Db = configuration.require.Db
, Server = configuration.require.Server;
console.log("-------------------------------------------- 0")
var fs_client = new Db(configuration.database, new Server("127.0.0.1", 25117, {auto_reconnect: false}), configuration.writeConcernMax());
fs_client.open(function(err, fs_client) {
console.log("-------------------------------------------- 1")
test.ok(err != null)
test.done();
})
Expand Down

0 comments on commit 9566365

Please sign in to comment.