diff options
author | Robert Guo <robert.guo@10gen.com> | 2016-03-08 12:21:22 -0500 |
---|---|---|
committer | Robert Guo <robert.guo@10gen.com> | 2016-03-14 12:55:05 -0400 |
commit | 3baef26cde253bf92b17d50d2da999e4919da814 (patch) | |
tree | fd349f6dbc125ed138e64ccd24675100cdceac14 /src/mongo/dbtests | |
parent | 5829530b254be18eda99050d421b7c7ebbc39acb (diff) | |
download | mongo-3baef26cde253bf92b17d50d2da999e4919da814.tar.gz |
SERVER-22900 validate command per index stat should be consistant with global stat
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r-- | src/mongo/dbtests/validate_tests.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/dbtests/validate_tests.cpp b/src/mongo/dbtests/validate_tests.cpp index 48ee3a8fc1d..a2e6d478ee3 100644 --- a/src/mongo/dbtests/validate_tests.cpp +++ b/src/mongo/dbtests/validate_tests.cpp @@ -73,6 +73,17 @@ protected: // Check if errors are reported if and only if valid is set to false. ASSERT_EQ(results.valid, results.errors.empty()); + if (_full) { + BSONObj outputObj = output.done(); + + bool allIndexesValid = true; + for (auto elem : outputObj["indexDetails"].Obj()) { + BSONObj indexDetail(elem.value()); + allIndexesValid = indexDetail["valid"].boolean() ? allIndexesValid : false; + } + ASSERT_EQ(results.valid, allIndexesValid); + } + return results.valid; } |