diff options
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/noPassthrough/collation_feature_compatibility_version.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/jstests/noPassthrough/collation_feature_compatibility_version.js b/jstests/noPassthrough/collation_feature_compatibility_version.js index df3516b2b3e..2f393c2a99a 100644 --- a/jstests/noPassthrough/collation_feature_compatibility_version.js +++ b/jstests/noPassthrough/collation_feature_compatibility_version.js @@ -29,6 +29,25 @@ assert.commandWorked(res); assert.eq("3.2", res.featureCompatibilityVersion); + // We cannot create a collection with a default collation when the featureCompatibilityVersion + // is 3.2. + assert.commandFailed( + collationDB.createCollection("collection", {collation: {locale: "fr_CA"}})); + + // We cannot explicitly give a collection the simple collation as its default when the + // featureCompatibilityVersion is 3.2. + assert.commandFailed( + collationDB.createCollection("collection", {collation: {locale: "simple"}})); + + // We cannot create a view with a default collation when the featureCompatibilityVersion is 3.2. + assert.commandFailed(collationDB.runCommand( + {create: "view", viewOn: "caseInsensitive", collation: {locale: "fr_CA"}})); + + // We cannot explicitly give a view the simple collation as its default when the + // featureCompatibilityVersion is 3.2. + assert.commandFailed(collationDB.runCommand( + {create: "view", viewOn: "caseInsensitive", collation: {locale: "simple"}})); + // All operations reject the collation parameter when the featureCompatibilityVersion is 3.2. assert.throws(function() { caseInsensitive.aggregate([], {collation: {locale: "en_US"}}); |