@@ -270,21 +270,21 @@ exports['Unordered bulk operation should fail correctly when not authenticated']
270
270
}
271
271
}
272
272
273
- /**********************************************************************************************
273
+ // / **********************************************************************************************
274
274
275
- ReplsetRep ReplsetRepl tReplsetRe etRepl Repl t plsetReplse eplsetReplse
276
- setReplsetR setReplsetRe setReplset plsetR plsetRepls tReplsetRepl etReplsetRep
277
- pls pls epls plse epls pls epl etRep etRe lset setR pls Rep et
278
- tReplsetRe tRe etReplsetRe et plset epl set
279
- lsetRepls lsetRe plsetRepls pl Repls etRepl epl
280
- ReplsetR Replset tReplsetR tR Repls plsetRe et
281
- setReplse setRepl lse lse etRe tReplse pls
282
- epl Rep e epl Rep tRep Re lset lse tRe
283
- etR setRep etRe tRe set set se epls Repl Repl epl lse
284
- eplse eplset eplsetR plse Replse tReplsetRep etReplsetR lsetRep setR etRepls
285
- etRep tRep etReplsetRep setRep lsetReplset plsetRepl ReplsetRepls plsetRe
275
+ // ReplsetRep ReplsetRepl tReplsetRe etRepl Repl t plsetReplse eplsetReplse
276
+ // setReplsetR setReplsetRe setReplset plsetR plsetRepls tReplsetRepl etReplsetRep
277
+ // pls pls epls plse epls pls epl etRep etRe lset setR pls Rep et
278
+ // tReplsetRe tRe etReplsetRe et plset epl set
279
+ // lsetRepls lsetRe plsetRepls pl Repls etRepl epl
280
+ // ReplsetR Replset tReplsetR tR Repls plsetRe et
281
+ // setReplse setRepl lse lse etRe tReplse pls
282
+ // epl Rep e epl Rep tRep Re lset lse tRe
283
+ // etR setRep etRe tRe set set se epls Repl Repl epl lse
284
+ // eplse eplset eplsetR plse Replse tReplsetRep etReplsetR lsetRep setR etRepls
285
+ // etRep tRep etReplsetRep setRep lsetReplset plsetRepl ReplsetRepls plsetRe
286
286
287
- **********************************************************************************************/
287
+ // **********************************************************************************************/
288
288
289
289
var replSetManager ;
290
290
@@ -342,7 +342,7 @@ exports['Should correctly handle replicaset master stepdown and stepup without l
342
342
// Connect
343
343
new Db ( 'replicaset_test_auth' , replSet , { w :1 } ) . open ( function ( err , db ) {
344
344
// Just set auths for the manager to handle it correctly
345
- replSetManager . setCredentials ( "mongocr " , "admin" , "root" , "root" ) ;
345
+ replSetManager . setCredentials ( "default " , "admin" , "root" , "root" ) ;
346
346
// Add a user
347
347
db . admin ( ) . addUser ( "root" , "root" , { w :4 , wtimeout : 25000 } , function ( err , result ) {
348
348
// test.equal(null, err);
@@ -408,7 +408,7 @@ exports.shouldCorrectlyAuthenticateUsingPrimary = {
408
408
// test.equal(null, err);
409
409
410
410
// Just set auths for the manager to handle it correctly
411
- replSetManager . setCredentials ( "mongocr " , "node-native-test" , "me" , "secret" ) ;
411
+ replSetManager . setCredentials ( "default " , "node-native-test" , "me" , "secret" ) ;
412
412
413
413
// Close the connection
414
414
db . close ( ) ;
@@ -473,7 +473,7 @@ exports.shouldCorrectlyAuthenticateWithTwoSeeds = {
473
473
474
474
db . addUser ( "me" , "secret" , { w :4 , wtimeout : 25000 } , function ( err , result ) {
475
475
// Just set auths for the manager to handle it correctly
476
- replSetManager . setCredentials ( "mongocr " , "node-native-test" , "me" , "secret" ) ;
476
+ replSetManager . setCredentials ( "default " , "node-native-test" , "me" , "secret" ) ;
477
477
478
478
// Close the connection
479
479
db . close ( ) ;
@@ -541,7 +541,7 @@ exports.shouldCorrectlyAuthenticateWithOnlySecondarySeed = {
541
541
p_db . close ( ) ;
542
542
543
543
// Just set auths for the manager to handle it correctly
544
- replSetManager . setCredentials ( "mongocr " , "admin" , "me" , "secret" ) ;
544
+ replSetManager . setCredentials ( "default " , "admin" , "me" , "secret" ) ;
545
545
546
546
// connection string
547
547
var config = f ( "mongodb://me:secret@localhost:%s/node-native-test?authSource=admin&readPreference=secondary&replicaSet=%s&maxPoolSize=1"
@@ -639,7 +639,7 @@ exports.shouldCorrectlyAuthenticateWithMultipleLoginsAndLogouts = {
639
639
// test.ok(result != null);
640
640
641
641
// Just set auths for the manager to handle it correctly
642
- replSetManager . setCredentials ( "mongocr " , "admin" , "me" , "secret" ) ;
642
+ replSetManager . setCredentials ( "default " , "admin" , "me" , "secret" ) ;
643
643
644
644
db . collection ( "stuff" , function ( err , collection ) {
645
645
collection . insert ( { a :2 } , { w : 3 } , authenticate1 ) ;
@@ -774,15 +774,15 @@ exports.shouldCorrectlyAuthenticateAndEnsureIndex = {
774
774
775
775
db_p . admin ( ) . addUser ( "me" , "secret" , { w :4 } , function runWhatever ( err , result ) {
776
776
// Just set auths for the manager to handle it correctly
777
- replSetManager . setCredentials ( "mongocr " , "admin" , "me" , "secret" ) ;
777
+ replSetManager . setCredentials ( "default " , "admin" , "me" , "secret" ) ;
778
778
779
779
db_p . admin ( ) . authenticate ( "me" , "secret" , function ( err , result ) {
780
780
test . equal ( null , err ) ;
781
781
782
782
db_p . addUser ( 'test' , 'test' , { w :4 , wtimeout :25000 } , function ( err , result ) {
783
783
784
784
// Just set auths for the manager to handle it correctly
785
- replSetManager . setCredentials ( "mongocr " , "admin" , "test" , "test" ) ;
785
+ replSetManager . setCredentials ( "default " , "admin" , "test" , "test" ) ;
786
786
787
787
db_p . authenticate ( 'test' , 'test' , function ( err , replies ) {
788
788
@@ -847,15 +847,15 @@ exports.shouldCorrectlyAuthenticateAndUseReadPreference = {
847
847
848
848
db_p . admin ( ) . addUser ( "me" , "secret" , { w :4 , wtimeout :25000 } , function runWhatever ( err , result ) {
849
849
// Just set auths for the manager to handle it correctly
850
- replSetManager . setCredentials ( "mongocr " , "admin" , "me" , "secret" ) ;
850
+ replSetManager . setCredentials ( "default " , "admin" , "me" , "secret" ) ;
851
851
852
852
db_p . admin ( ) . authenticate ( "me" , "secret" , function ( err , result ) {
853
853
test . equal ( null , err ) ;
854
854
855
855
db_p . addUser ( 'test' , 'test' , { w :4 , wtimeout :25000 } , function ( err , result ) {
856
856
857
857
// Just set auths for the manager to handle it correctly
858
- replSetManager . setCredentials ( "mongocr " , "admin" , "test" , "test" ) ;
858
+ replSetManager . setCredentials ( "default " , "admin" , "test" , "test" ) ;
859
859
860
860
db_p . authenticate ( 'test' , 'test' , function ( err , replies ) {
861
861
test . equal ( null , err ) ;
@@ -910,7 +910,7 @@ exports.shouldCorrectlyBringReplicasetStepDownPrimaryAndStillReadFromSecondary =
910
910
test . ok ( db_p != null ) ;
911
911
db_p . admin ( ) . addUser ( "me" , "secret" , { w :4 , wtimeout :25000 } , function runWhatever ( err , result ) {
912
912
// Just set auths for the manager to handle it correctly
913
- replSetManager . setCredentials ( "mongocr " , "admin" , "me" , "secret" ) ;
913
+ replSetManager . setCredentials ( "default " , "admin" , "me" , "secret" ) ;
914
914
915
915
db_p . admin ( ) . authenticate ( "me" , "secret" , function ( err , result ) {
916
916
test . equal ( null , err ) ;
@@ -922,7 +922,7 @@ exports.shouldCorrectlyBringReplicasetStepDownPrimaryAndStillReadFromSecondary =
922
922
test . equal ( null , err ) ;
923
923
test . ok ( result != null ) ;
924
924
925
- db . serverConfig . on ( 'joined' , function ( t ) {
925
+ db . serverConfig . on ( 'joined' , function ( t , s ) {
926
926
if ( t == 'primary' ) {
927
927
var counter = 1000 ;
928
928
var errors = 0 ;
@@ -948,7 +948,7 @@ exports.shouldCorrectlyBringReplicasetStepDownPrimaryAndStillReadFromSecondary =
948
948
}
949
949
}
950
950
} ) ;
951
- db . serverConfig . on ( 'left' , function ( t ) {
951
+ db . serverConfig . on ( 'left' , function ( t , s ) {
952
952
} ) ;
953
953
// Step down the primary
954
954
replSetManager . stepDown ( { force :true } , function ( err , result ) {
@@ -996,7 +996,7 @@ exports.shouldCorrectlyAuthWithSecondaryAfterKillPrimary = {
996
996
test . equal ( null , err ) ;
997
997
998
998
// Just set auths for the manager to handle it correctly
999
- replSetManager . setCredentials ( "mongocr " , "test" , "me" , "secret" ) ;
999
+ replSetManager . setCredentials ( "default " , "test" , "me" , "secret" ) ;
1000
1000
1001
1001
db_p . collection ( 'test' ) . insert ( { a :1 } , { w :1 } , function ( err , result ) {
1002
1002
test . equal ( null , err ) ;
@@ -1073,7 +1073,7 @@ exports.shouldCorrectlyAuthAgainstReplicaSetAdminDbUsingMongoClient = {
1073
1073
1074
1074
db_p . admin ( ) . addUser ( "me" , "secret" , { w :4 , wtimeout :25000 } , function runWhatever ( err , result ) {
1075
1075
// Just set auths for the manager to handle it correctly
1076
- replSetManager . setCredentials ( "mongocr " , "admin" , "me" , "secret" ) ;
1076
+ replSetManager . setCredentials ( "default " , "admin" , "me" , "secret" ) ;
1077
1077
1078
1078
db_p . close ( ) ;
1079
1079
@@ -1142,7 +1142,7 @@ exports.shouldCorrectlyAuthAgainstNormalDbUsingMongoClient = {
1142
1142
1143
1143
db_p . addUser ( "me" , "secret" , { w :4 , wtimeout : 25000 } , function runWhatever ( err , result ) {
1144
1144
// Just set auths for the manager to handle it correctly
1145
- replSetManager . setCredentials ( "mongocr " , "admin" , "me" , "secret" ) ;
1145
+ replSetManager . setCredentials ( "default " , "admin" , "me" , "secret" ) ;
1146
1146
1147
1147
db_p . close ( ) ;
1148
1148
@@ -1275,7 +1275,7 @@ exports['should correctly connect and authenticate against admin database using
1275
1275
1276
1276
db . addUser ( "me" , "secret" , { w :'majority' } , function ( err , result ) {
1277
1277
// Just set auths for the manager to handle it correctly
1278
- shardedManager . setCredentials ( "mongocr " , "node-native-test" , "me" , "secret" ) ;
1278
+ shardedManager . setCredentials ( "default " , "node-native-test" , "me" , "secret" ) ;
1279
1279
1280
1280
// Close the connection
1281
1281
db . close ( ) ;
@@ -1340,7 +1340,7 @@ exports['Should correctly handle replicaset master stepdown and stepup without l
1340
1340
db . addUser ( "me" , "secret" , { w :'majority' } , function ( err , result ) {
1341
1341
1342
1342
// Just set auths for the manager to handle it correctly
1343
- shardedManager . setCredentials ( "mongocr " , "admin" , "me" , "secret" ) ;
1343
+ shardedManager . setCredentials ( "default " , "admin" , "me" , "secret" ) ;
1344
1344
1345
1345
// Close the connection
1346
1346
db . close ( ) ;
0 commit comments