diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2017-01-24 16:54:41 -0500 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2017-01-25 13:14:43 -0500 |
commit | 7291530810419a7788263e4119c485a490b4904c (patch) | |
tree | a1c7ebc205212a9aaa6e0cd4cd7a4e61ea6621be | |
parent | 60185f785b617c775fd15cd6c7212373d936f0d5 (diff) | |
download | mongo-7291530810419a7788263e4119c485a490b4904c.tar.gz |
SERVER-26676 Remove collection info massage from multiversion suite collection validation
-rw-r--r-- | jstests/multiVersion/libs/verify_collection_data.js | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/jstests/multiVersion/libs/verify_collection_data.js b/jstests/multiVersion/libs/verify_collection_data.js index ab96a1ef29c..b8eeca557f7 100644 --- a/jstests/multiVersion/libs/verify_collection_data.js +++ b/jstests/multiVersion/libs/verify_collection_data.js @@ -63,29 +63,6 @@ createCollectionWithData = function(db, collectionName, dataGenerator) { return db.getCollection(collectionName); }; -// MongoDB 3.4 introduces new fields into the listCollections result document. This function -// injects expected 3.4 values into a 3.2 document to allow for object comparison. -// TODO SERVER-26676: Remove this check post-3.4 release. -var injectExpected34FieldsIf32 = function(collectionInfo, dbVersion) { - if (dbVersion.startsWith("3.2")) { - return Object.extend({type: "collection", info: {readOnly: false}}, collectionInfo); - } - - return collectionInfo; -}; - -// MongoDB 3.4 introduces a new field 'idIndex' into the listCollections result document. This -// cannot be injected into the 3.2 listCollections result document because the full index spec is -// not known. This function removes the 'idIndex' field to allow for object comparison. -// TODO SERVER-26676: Remove this check post-3.4 release. -var removeIdIndexField = function(collectionInfo) { - if (collectionInfo.hasOwnProperty("idIndex")) { - delete collectionInfo.idIndex; - } - - return collectionInfo; -}; - // Class to save the state of a collection and later compare the current state of a collection to // the saved state function CollectionDataValidator() { @@ -138,11 +115,7 @@ function CollectionDataValidator() { // Get the metadata for this collection var newCollectionInfo = this.getCollectionInfo(collection); - - let colInfo1 = removeIdIndexField(injectExpected34FieldsIf32(_collectionInfo, _dbVersion)); - let colInfo2 = removeIdIndexField( - injectExpected34FieldsIf32(newCollectionInfo, dbVersionForCollection)); - assert.docEq(colInfo1, colInfo2, "collection metadata not equal"); + assert.docEq(_collectionInfo, newCollectionInfo, "collection metadata not equal"); // Get the indexes for this collection var newIndexData = collection.getIndexes().sort(function(a, b) { |