summaryrefslogtreecommitdiff
path: root/jstests/core/apitest_db.js
diff options
context:
space:
mode:
authorJason Rassi <rassi@10gen.com>2014-12-16 14:23:48 -0500
committerJason Rassi <rassi@10gen.com>2014-12-16 14:31:58 -0500
commit0aede468dc2ea475aa83bddd8be1e56a19ca6a3a (patch)
tree97e72eefddfc6f533635b38ff7b7994f6f683233 /jstests/core/apitest_db.js
parent7917b37c07d67dfb0e4bc8336942526962dceef3 (diff)
downloadmongo-0aede468dc2ea475aa83bddd8be1e56a19ca6a3a.tar.gz
SERVER-16518 listCollections response changed to cursor object form
As a temporary compatibility measure, the legacy behavior is preserved if the "cursor" option is not sent with the command. This compatibility layer will be removed as part of work for the parent ticket.
Diffstat (limited to 'jstests/core/apitest_db.js')
-rw-r--r--jstests/core/apitest_db.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/core/apitest_db.js b/jstests/core/apitest_db.js
index 41af5abfaca..5c5b4efd3dc 100644
--- a/jstests/core/apitest_db.js
+++ b/jstests/core/apitest_db.js
@@ -55,10 +55,10 @@ var validStorageEngineOptions = {}
validStorageEngineOptions[storageEngineName] = {};
db.getCollection('test').drop();
assert.commandWorked(db.createCollection('test', {storageEngine: validStorageEngineOptions}));
-var result = assert.commandWorked(db.runCommand('listCollections'));
+var collections = db.getCollectionInfos();
found = false;
-for (var i = 0; i < result.collections.length; ++i) {
- var collection = result.collections[i];
+for (var i = 0; i < collections.length; ++i) {
+ var collection = collections[i];
if (collection.name != 'test') {
continue;
}