diff options
author | James Wahlin <james.wahlin@10gen.com> | 2016-07-18 11:13:53 -0400 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2016-07-18 11:16:15 -0400 |
commit | 4d826acb5648a78d0af0fefac5abe6fbbe7c854a (patch) | |
tree | a6ac4d84d74dc1531add500bc6c3abce3a00df51 /jstests/hooks/validate_collections.js | |
parent | c970ae123e3f86bc84e8484487a946daa982dc1e (diff) | |
download | mongo-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.js | 11 |
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) { |