diff options
author | Jason Rassi <rassi@10gen.com> | 2015-01-12 18:13:52 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2015-01-15 05:41:10 -0500 |
commit | 0aa409c0f7c1d65cf352e729e7b4787cfea20c23 (patch) | |
tree | 7f8c9fbd2b54009b379c078b2e12eb25a68b565c /jstests | |
parent | 6e7546ef5f1450321550441e83c33f99d96722ea (diff) | |
download | mongo-0aa409c0f7c1d65cf352e729e7b4787cfea20c23.tar.gz |
SERVER-16659 listColls/listIndexes: empty cursor obj no longer needed
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/auth/lib/commands_lib.js | 4 | ||||
-rw-r--r-- | jstests/core/list_collections1.js | 2 | ||||
-rw-r--r-- | jstests/core/list_indexes1.js | 6 | ||||
-rw-r--r-- | jstests/core/list_indexes2.js | 6 | ||||
-rw-r--r-- | jstests/core/rename_stayTemp.js | 2 | ||||
-rw-r--r-- | jstests/mmap_v1/list_collections2.js | 2 | ||||
-rw-r--r-- | jstests/replsets/temp_namespace.js | 6 |
7 files changed, 13 insertions, 15 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js index 043c15fc2dd..2ef0ac2616c 100644 --- a/jstests/auth/lib/commands_lib.js +++ b/jstests/auth/lib/commands_lib.js @@ -1436,7 +1436,7 @@ var authCommandsLib = { }, { testname: "listCollections", - command: {listCollections: 1, cursor: {}}, + command: {listCollections: 1}, setup: function (db) { db.x.insert({_id: 5}); db.y.insert({_id: 6}); @@ -1475,7 +1475,7 @@ var authCommandsLib = { }, { testname: "listIndexes", - command: {listIndexes: "x", cursor: {}}, + command: {listIndexes: "x"}, setup: function (db) { db.x.insert({_id: 5}); db.x.insert({_id: 6}); diff --git a/jstests/core/list_collections1.js b/jstests/core/list_collections1.js index d925f3d7c4e..1addcffee7d 100644 --- a/jstests/core/list_collections1.js +++ b/jstests/core/list_collections1.js @@ -7,7 +7,7 @@ mydb.foo.insert( { x : 5 } ); mydb.runCommand( { create : "bar", temp : true } ); -res = mydb.runCommand( "listCollections", { cursor : {} } ); +res = mydb.runCommand( "listCollections" ); collections = new DBCommandCursor( db.getMongo(), res ).toArray(); bar = collections.filter( function(x){ return x.name == "bar"; } )[0]; diff --git a/jstests/core/list_indexes1.js b/jstests/core/list_indexes1.js index 9fc2d46ac86..b7f60132b3b 100644 --- a/jstests/core/list_indexes1.js +++ b/jstests/core/list_indexes1.js @@ -3,17 +3,17 @@ t = db.list_indexes1; t.drop(); -res = t.runCommand( "listIndexes", { cursor: {} } ); +res = t.runCommand( "listIndexes" ); assert.commandFailed(res); t.insert( { x : 1 } ); -res = t.runCommand( "listIndexes", { cursor: {} } ); +res = t.runCommand( "listIndexes" ); indexes = new DBCommandCursor( db.getMongo(), res ).toArray(); assert.eq( 1, indexes.length, tojson( res ) ); t.ensureIndex( { x : 1 } ); -res = t.runCommand( "listIndexes", { cursor: {} } ); +res = t.runCommand( "listIndexes" ); indexes = new DBCommandCursor( db.getMongo(), res ).toArray(); assert.eq( 2, indexes.length, tojson( res ) ); diff --git a/jstests/core/list_indexes2.js b/jstests/core/list_indexes2.js index 048f502768d..793121e8981 100644 --- a/jstests/core/list_indexes2.js +++ b/jstests/core/list_indexes2.js @@ -5,18 +5,18 @@ t.drop(); t.insert({value: "dummy"}); // non-string in argument -err = db.runCommand({listIndexes: 1}, { cursor: {} }); +err = db.runCommand({listIndexes: 1}); assert.commandFailed(err); assert.eq(err.code, 28528); // empty string in argument -err = db.runCommand({listIndexes: ''}, { cursor: {} }); +err = db.runCommand({listIndexes: ''}); assert.commandFailed(err); assert.eq(err.code, 28529); // non-existing collection in argument db.list_listindexes2_no_such_collection.drop(); -err = db.runCommand({listIndexes: 'list_listindexes2_no_such_collection'}, { cursor: {} }); +err = db.runCommand({listIndexes: 'list_listindexes2_no_such_collection'}); assert.commandFailed(err); assert.eq(err.code, 26); diff --git a/jstests/core/rename_stayTemp.js b/jstests/core/rename_stayTemp.js index e01ffd3b0c9..47230023244 100644 --- a/jstests/core/rename_stayTemp.js +++ b/jstests/core/rename_stayTemp.js @@ -7,7 +7,7 @@ db[dest].drop() function ns(coll){ return db[coll].getFullName() } function istemp( name ) { - var result = db.runCommand( "listCollections", { filter : { name : name }, cursor: {} } ); + var result = db.runCommand( "listCollections", { filter : { name : name } } ); assert( result.ok ); var collections = new DBCommandCursor( db.getMongo(), result ).toArray(); assert.eq( 1, collections.length ); diff --git a/jstests/mmap_v1/list_collections2.js b/jstests/mmap_v1/list_collections2.js index 5f7de730eea..f1f3c47a811 100644 --- a/jstests/mmap_v1/list_collections2.js +++ b/jstests/mmap_v1/list_collections2.js @@ -7,7 +7,7 @@ mydb.foo.insert( { x : 5 } ); mydb.runCommand( { create : "bar", temp : true } ); -res = mydb.runCommand( "listCollections", { cursor : {} } ); +res = mydb.runCommand( "listCollections" ); collections = new DBCommandCursor( db.getMongo(), res ).toArray(); bar = collections.filter( function(x){ return x.name == "bar"; } )[0]; diff --git a/jstests/replsets/temp_namespace.js b/jstests/replsets/temp_namespace.js index 88d5b369f71..88a256db87f 100644 --- a/jstests/replsets/temp_namespace.js +++ b/jstests/replsets/temp_namespace.js @@ -34,15 +34,13 @@ assert.writeOK(masterDB.keep4.insert({}, { writeConcern: { w: 2 }})); // make sure they exist on primary and secondary function countCollection( mydb, nameFilter ) { - var result = mydb.runCommand( "listCollections", { filter : { name : nameFilter }, - cursor : {} } ); + var result = mydb.runCommand( "listCollections", { filter : { name : nameFilter } } ); assert.commandWorked( result ); return new DBCommandCursor( mydb.getMongo(), result ).itcount(); } function countIndexesFor( mydb, nameFilter ) { - var result = mydb.runCommand( "listCollections", { filter : { name : nameFilter }, - cursor : {} } ); + var result = mydb.runCommand( "listCollections", { filter : { name : nameFilter } } ); assert.commandWorked( result ); var arr = new DBCommandCursor( mydb.getMongo(), result ).toArray(); var total = 0; |