summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2015-07-21 12:03:06 -0400
committerJames Wahlin <james.wahlin@10gen.com>2015-07-22 14:17:20 -0400
commit13b7fba6b89782fbe02d5db4a972a3c67b0e46f1 (patch)
tree37be211a3dc880f934a4bc6fe4a1fdad07a0820e /jstests
parent7f9f03501855057756d006ae7e4c664e962e7342 (diff)
downloadmongo-13b7fba6b89782fbe02d5db4a972a3c67b0e46f1.tar.gz
SERVER-19504 Remove indexStats command artifacts
Diffstat (limited to 'jstests')
-rw-r--r--jstests/auth/commands_builtin_roles.js1
-rw-r--r--jstests/auth/commands_user_defined_roles.js1
-rw-r--r--jstests/auth/lib/commands_lib.js28
-rw-r--r--jstests/core/indexStatsCommand.js90
-rw-r--r--jstests/slow2/sharding_jscore_passthrough.js1
5 files changed, 0 insertions, 121 deletions
diff --git a/jstests/auth/commands_builtin_roles.js b/jstests/auth/commands_builtin_roles.js
index 733600e521b..80ba2c981c7 100644
--- a/jstests/auth/commands_builtin_roles.js
+++ b/jstests/auth/commands_builtin_roles.js
@@ -146,7 +146,6 @@ function checkForNonExistentRoles() {
var opts = {
auth:"",
- enableExperimentalIndexStatsCmd: "",
enableExperimentalStorageDetailsCmd: ""
}
var impls = {
diff --git a/jstests/auth/commands_user_defined_roles.js b/jstests/auth/commands_user_defined_roles.js
index facf097ea61..760dabaa6ea 100644
--- a/jstests/auth/commands_user_defined_roles.js
+++ b/jstests/auth/commands_user_defined_roles.js
@@ -178,7 +178,6 @@ function createUsers(conn) {
var opts = {
auth:"",
- enableExperimentalIndexStatsCmd: "",
enableExperimentalStorageDetailsCmd: ""
}
var impls = {
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index 7189ba346f9..18ccb128e58 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -1440,34 +1440,6 @@ var authCommandsLib = {
}
]
},
-/* temporarily removed see SERVER-13555
- {
- testname: "indexStats",
- command: {indexStats: "x", index: "a_1"},
- skipSharded: true,
- setup: function (db) {
- db.x.save({a: 10});
- db.x.ensureIndex({a: 1});
- },
- teardown: function (db) { db.x.drop(); },
- testcases: [
- {
- runOnDb: firstDbName,
- roles: roles_dbAdmin,
- privileges: [
- { resource: {db: firstDbName, collection: "x"}, actions: ["indexStats"] }
- ]
- },
- {
- runOnDb: secondDbName,
- roles: roles_dbAdminAny,
- privileges: [
- { resource: {db: secondDbName, collection: "x"}, actions: ["indexStats"] }
- ]
- }
- ]
- },
-*/
{
testname: "isMaster",
command: {isMaster: 1},
diff --git a/jstests/core/indexStatsCommand.js b/jstests/core/indexStatsCommand.js
deleted file mode 100644
index 375d17398b6..00000000000
--- a/jstests/core/indexStatsCommand.js
+++ /dev/null
@@ -1,90 +0,0 @@
-db.indexStatsCommand.drop();
-db.createCollection("indexStatsCommand");
-
-t = db.indexStatsCommand;
-
-var COMMAND_NOT_FOUND_CODE = 59;
-
-for (var i = 0; i < 3000; ++i) {
- t.insert({i: i, d: i % 13});
-}
-
-function textWithIndexVersion(version) {
- var indexName = 'test_d_' + version;
- t.ensureIndex({d: 1}, {v: version, name: indexName});
-
- var result = t.indexStats({index: indexName});
- if (result["code"] === COMMAND_NOT_FOUND_CODE) {
- print("storageDetails command not available: skipping");
- return;
- }
-
- assert.commandWorked(result);
-
- assert(result.index === indexName);
- assert(result.isIdIndex === false);
- assert(isObject(result.keyPattern));
- assert.neq(result.keyPattern, null);
- assert(isString(result.storageNs));
- assert(isNumber(result.bucketBodyBytes));
- assert.eq(result.depth, 1);
- assert(isObject(result.overall));
- assert.neq(result.overall, null);
-
- function checkStats(data) {
- assert(data.count instanceof NumberLong);
- assert(isNumber(data.mean));
- assert(isNumber(data.stddev));
- assert(isNumber(data.min));
- assert(isNumber(data.max));
- }
-
- function checkAreaStats(data) {
- assert(isNumber(data.numBuckets));
-
- assert(isObject(data.keyCount));
- assert.neq(data.keyCount, null);
- checkStats(data.keyCount);
-
- assert(isObject(data.usedKeyCount));
- assert.neq(data.usedKeyCount, null);
- checkStats(data.usedKeyCount);
-
- assert(isObject(data.bsonRatio));
- assert.neq(data.bsonRatio, null);
- checkStats(data.bsonRatio);
-
- assert(isObject(data.keyNodeRatio));
- assert.neq(data.keyNodeRatio, null);
- checkStats(data.keyNodeRatio);
-
- assert(isObject(data.fillRatio));
- assert.neq(data.fillRatio, null);
- checkStats(data.fillRatio);
- }
-
- assert(isObject(result.overall));
- checkAreaStats(result.overall);
-
- assert(result.perLevel instanceof Array);
- for (var i = 0; i < result.perLevel.length; ++i) {
- assert(isObject(result.perLevel[i]));
- checkAreaStats(result.perLevel[i]);
- }
-
- result = t.indexStats();
- assert.commandFailed(result);
- assert(result.errmsg.match(/index name is required/));
-
- result = t.indexStats({index: "nonexistent"})
- assert.commandFailed(result);
- assert(result.errmsg.match(/index does not exist/));
-
- result = t.indexStats({index: "_id_", expandNodes: ['string']})
- assert.commandFailed(result);
- assert(result.errmsg.match(/expandNodes.*numbers/));
-
- t.dropIndex(indexName);
-}
-
-[0, 1].map(textWithIndexVersion);
diff --git a/jstests/slow2/sharding_jscore_passthrough.js b/jstests/slow2/sharding_jscore_passthrough.js
index dd05d941dc8..dfb9ac5e1bd 100644
--- a/jstests/slow2/sharding_jscore_passthrough.js
+++ b/jstests/slow2/sharding_jscore_passthrough.js
@@ -130,7 +130,6 @@ var db;
'mr_replaceIntoDB|' +
'mr_auth|' +
'queryoptimizera|' +
- 'indexStatsCommand|' +
'storageDetailsCommand|' +
'reversecursor|' +
'stages.*|' +