summaryrefslogtreecommitdiff
path: root/jstests/auth
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2014-12-18 14:50:28 -0500
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2015-01-09 18:40:56 -0500
commitf18c1a14b4aa78cce9ee6e7fa21448eb7b2da05f (patch)
tree09e5e7784cd223c2ca4238e2a8269e4382ccb488 /jstests/auth
parent81109be93d335a4a8a5bca64001c56c41640ba96 (diff)
downloadmongo-f18c1a14b4aa78cce9ee6e7fa21448eb7b2da05f.tar.gz
SERVER-16580 Remove deprecated system collection references in JS tests
Diffstat (limited to 'jstests/auth')
-rw-r--r--jstests/auth/indexSystemUsers.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/jstests/auth/indexSystemUsers.js b/jstests/auth/indexSystemUsers.js
index abe188194ea..056013f18cf 100644
--- a/jstests/auth/indexSystemUsers.js
+++ b/jstests/auth/indexSystemUsers.js
@@ -21,11 +21,12 @@ assert.writeError(adminDB.exploit.system.indexes.insert({ ns: "admin.system.user
unique: true,
dropDups: true }));
// Make sure that no indexes were built.
-assert.eq(null,
- adminDB.system.namespaces.findOne(
+var collectionInfosCursor = adminDB.runCommand("listCollections", { filter:
{$and : [{name : /^admin\.system\.users\.\$/},
{name : {$ne : "admin.system.users.$_id_"}},
- {name : {$ne : "admin.system.users.$user_1_db_1"}} ]}));
+ {name : {$ne : "admin.system.users.$user_1_db_1"}} ]}});
+
+assert.eq([], new DBCommandCursor(adminDB.getMongo(), collectionInfosCursor).toArray());
adminDB.logout();
adminDB.auth('admin','x');