summaryrefslogtreecommitdiff
path: root/jstests/hooks/validate_collections.js
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2016-07-18 11:13:53 -0400
committerJames Wahlin <james.wahlin@10gen.com>2016-07-18 11:16:15 -0400
commit4d826acb5648a78d0af0fefac5abe6fbbe7c854a (patch)
treea6ac4d84d74dc1531add500bc6c3abce3a00df51 /jstests/hooks/validate_collections.js
parentc970ae123e3f86bc84e8484487a946daa982dc1e (diff)
downloadmongo-4d826acb5648a78d0af0fefac5abe6fbbe7c854a.tar.gz
Revert "SERVER-24506 listCollections support for views"r3.3.10
This reverts commit bfa627513c781c9e61b25dcf993fcd01aaeed0c3.
Diffstat (limited to 'jstests/hooks/validate_collections.js')
-rw-r--r--jstests/hooks/validate_collections.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/jstests/hooks/validate_collections.js b/jstests/hooks/validate_collections.js
index 946a0663894..5024460f05a 100644
--- a/jstests/hooks/validate_collections.js
+++ b/jstests/hooks/validate_collections.js
@@ -20,14 +20,9 @@ function validateCollections(db, obj) {
var full = obj.full;
var success = true;
-
- // Don't run validate on view namespaces.
- let listCollectionsRes = db.runCommand({listCollections: 1, filter: {"type": "collection"}});
- assert.commandWorked(listCollectionsRes);
- let collInfo = new DBCommandCursor(db.getMongo(), listCollectionsRes).toArray();
-
- for (var collDocument of collInfo) {
- var coll = db.getCollection(collDocument["name"]);
+ var collNames = db.getCollectionNames();
+ for (var collName of collNames) {
+ var coll = db.getCollection(collName);
var res = coll.validate(full);
if (!res.ok || !res.valid) {