diff options
author | Eliot Horowitz <eliot@10gen.com> | 2014-07-30 09:23:00 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2014-08-01 10:44:29 -0400 |
commit | ebec63d57182db2d21bdcd3b7a95636c06991190 (patch) | |
tree | 196565145b430396c9803ff000554f7a562e96aa /jstests/core/fts_index.js | |
parent | d7a94e259c94a46feab8fabebbd8c4dc0eebce8f (diff) | |
download | mongo-ebec63d57182db2d21bdcd3b7a95636c06991190.tar.gz |
SERVER-13635: move mmap_v1 specific tests and make other generic
Diffstat (limited to 'jstests/core/fts_index.js')
-rw-r--r-- | jstests/core/fts_index.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/core/fts_index.js b/jstests/core/fts_index.js index af927c86f48..7e52b761df3 100644 --- a/jstests/core/fts_index.js +++ b/jstests/core/fts_index.js @@ -15,22 +15,22 @@ coll.getDB().createCollection(coll.getName()); // Spec passes text-specific index validation. assert.commandWorked(coll.ensureIndex({a: "text"}, {name: indexName, default_language: "spanish"})); -assert.eq(1, coll.getDB().system.indexes.count({ns: coll.getFullName(), name: indexName})); +assert.eq( 1, coll.getIndexes().filter( function(z){ return z.name == indexName; } ).length ); coll.dropIndexes(); // Spec fails text-specific index validation ("spanglish" unrecognized). assert.commandFailed(coll.ensureIndex({a: "text"}, {name: indexName, default_language: "spanglish"})); -assert.eq(0, coll.system.indexes.count({ns: coll.getFullName(), name: indexName})); +assert.eq( 0, coll.getIndexes().filter( function(z){ return z.name == indexName; } ).length ); coll.dropIndexes(); // Spec passes general index validation. assert.commandWorked(coll.ensureIndex({"$**": "text"}, {name: indexName})); -assert.eq(1, coll.getDB().system.indexes.count({ns: coll.getFullName(), name: indexName})); +assert.eq( 1, coll.getIndexes().filter( function(z){ return z.name == indexName; } ).length ); coll.dropIndexes(); // Spec fails general index validation ("a.$**" invalid field name for key). assert.commandFailed(coll.ensureIndex({"a.$**": "text"}, {name: indexName})); -assert.eq(0, coll.getDB().system.indexes.count({ns: coll.getFullName(), name: indexName})); +assert.eq( 0, coll.getIndexes().filter( function(z){ return z.name == indexName; } ).length ); coll.dropIndexes(); // |