summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorRobert Guo <robert.guo@10gen.com>2016-03-08 12:21:22 -0500
committerRobert Guo <robert.guo@10gen.com>2016-03-14 12:55:05 -0400
commit3baef26cde253bf92b17d50d2da999e4919da814 (patch)
treefd349f6dbc125ed138e64ccd24675100cdceac14 /jstests
parent5829530b254be18eda99050d421b7c7ebbc39acb (diff)
downloadmongo-3baef26cde253bf92b17d50d2da999e4919da814.tar.gz
SERVER-22900 validate command per index stat should be consistant with global stat
Diffstat (limited to 'jstests')
-rw-r--r--jstests/core/index_bigkeys_validation.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/core/index_bigkeys_validation.js b/jstests/core/index_bigkeys_validation.js
index 98c80aa081a..739dd628446 100644
--- a/jstests/core/index_bigkeys_validation.js
+++ b/jstests/core/index_bigkeys_validation.js
@@ -17,6 +17,9 @@
assert.commandWorked(res);
assert(res.valid, tojson(res));
+ // Verify that the top level response object is consistent with the index-specific one.
+ assert.eq(res.valid, res.indexDetails[coll.getFullName() + '.$_id_'].valid);
+
// Change failIndexKeyTooLong back to the default value.
assert.commandWorked(db.adminCommand({setParameter: 1, failIndexKeyTooLong: true}));
@@ -26,6 +29,9 @@
assert.commandWorked(res);
assert.eq(res.valid, false, tojson(res));
+ // Verify that the top level response object is consistent with the index-specific one.
+ assert.eq(res.valid, res.indexDetails[coll.getFullName() + '.$_id_'].valid);
+
// Explicitly drop the collection to avoid failures in post-test hooks that run dbHash and
// validate commands.
coll.drop();