summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/type_shard_collection_test.cpp
diff options
context:
space:
mode:
authorSergi Mateo Bellido <sergi.mateo-bellido@mongodb.com>2021-03-01 14:25:00 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-02 15:02:46 +0000
commit392c79b60befd046bce5403a3ba6d087c599a478 (patch)
tree42754081320072e3f314b38c25232cf929a3787d /src/mongo/db/s/type_shard_collection_test.cpp
parenta5eb25bc73c1e75cea460a646c5879229c937091 (diff)
downloadmongo-392c79b60befd046bce5403a3ba6d087c599a478.tar.gz
SERVER-54790 Remove the 'allowMigrations' flag from config.collections when downgrading
- Making the allowMigrations field on config.collections optional - Since DDL operations cannot overlap with a setFCV, we can assume that allowMigrations is true when running the setFCV command. I added an invariant to verify that. - No reason to remove this field since it will never be present when downgrading.
Diffstat (limited to 'src/mongo/db/s/type_shard_collection_test.cpp')
-rw-r--r--src/mongo/db/s/type_shard_collection_test.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mongo/db/s/type_shard_collection_test.cpp b/src/mongo/db/s/type_shard_collection_test.cpp
index a9e8eba50bd..aa6fefd5214 100644
--- a/src/mongo/db/s/type_shard_collection_test.cpp
+++ b/src/mongo/db/s/type_shard_collection_test.cpp
@@ -112,14 +112,10 @@ TEST(ShardCollectionType, ReshardingFieldsIncluded) {
TEST(ShardCollectionType, AllowMigrationsFieldBackwardsCompatibility) {
ShardCollectionType shardCollType(kNss, OID::gen(), UUID::gen(), kKeyPattern, true);
shardCollType.setAllowMigrations(false);
- ASSERT_EQ(
- false,
- shardCollType.toBSON()[ShardCollectionTypeBase::kPre50CompatibleAllowMigrationsFieldName]
- .Bool());
+ ASSERT_EQ(false, shardCollType.toBSON()[ShardCollectionType::kAllowMigrationsFieldName].Bool());
shardCollType.setAllowMigrations(true);
- ASSERT(shardCollType.toBSON()[ShardCollectionTypeBase::kPre50CompatibleAllowMigrationsFieldName]
- .eoo());
+ ASSERT(shardCollType.toBSON()[ShardCollectionType::kAllowMigrationsFieldName].eoo());
}
} // namespace