summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/feature_compatibility_version.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/feature_compatibility_version.js')
-rw-r--r--jstests/noPassthrough/feature_compatibility_version.js78
1 files changed, 39 insertions, 39 deletions
diff --git a/jstests/noPassthrough/feature_compatibility_version.js b/jstests/noPassthrough/feature_compatibility_version.js
index 64cd6a3a5f7..4f7cd42f450 100644
--- a/jstests/noPassthrough/feature_compatibility_version.js
+++ b/jstests/noPassthrough/feature_compatibility_version.js
@@ -2,55 +2,55 @@
// the value of the featureCompatibilityVersion server parameter.
(function() {
- "use strict";
+"use strict";
- load("jstests/libs/feature_compatibility_version.js");
+load("jstests/libs/feature_compatibility_version.js");
- const conn = MongoRunner.runMongod({});
- assert.neq(null, conn, "mongod was unable to start up");
+const conn = MongoRunner.runMongod({});
+assert.neq(null, conn, "mongod was unable to start up");
- let adminDB = conn.getDB("admin");
+let adminDB = conn.getDB("admin");
- // Initially the featureCompatibilityVersion is latestFCV.
- checkFCV(adminDB, latestFCV);
+// Initially the featureCompatibilityVersion is latestFCV.
+checkFCV(adminDB, latestFCV);
- // Updating the featureCompatibilityVersion document changes the featureCompatibilityVersion
- // server parameter.
- assert.writeOK(adminDB.system.version.update({_id: "featureCompatibilityVersion"},
- {$set: {version: lastStableFCV}}));
- checkFCV(adminDB, lastStableFCV);
+// Updating the featureCompatibilityVersion document changes the featureCompatibilityVersion
+// server parameter.
+assert.writeOK(adminDB.system.version.update({_id: "featureCompatibilityVersion"},
+ {$set: {version: lastStableFCV}}));
+checkFCV(adminDB, lastStableFCV);
- assert.writeOK(
- adminDB.system.version.update({_id: "featureCompatibilityVersion"},
- {$set: {version: lastStableFCV, targetVersion: latestFCV}}));
- checkFCV(adminDB, lastStableFCV, latestFCV);
+assert.writeOK(
+ adminDB.system.version.update({_id: "featureCompatibilityVersion"},
+ {$set: {version: lastStableFCV, targetVersion: latestFCV}}));
+checkFCV(adminDB, lastStableFCV, latestFCV);
- assert.writeOK(adminDB.system.version.update(
- {_id: "featureCompatibilityVersion"},
- {$set: {version: lastStableFCV, targetVersion: lastStableFCV}}));
- checkFCV(adminDB, lastStableFCV, lastStableFCV);
+assert.writeOK(
+ adminDB.system.version.update({_id: "featureCompatibilityVersion"},
+ {$set: {version: lastStableFCV, targetVersion: lastStableFCV}}));
+checkFCV(adminDB, lastStableFCV, lastStableFCV);
- assert.writeOK(
- adminDB.system.version.update({_id: "featureCompatibilityVersion"},
- {$set: {version: latestFCV}, $unset: {targetVersion: true}}));
- checkFCV(adminDB, latestFCV);
+assert.writeOK(
+ adminDB.system.version.update({_id: "featureCompatibilityVersion"},
+ {$set: {version: latestFCV}, $unset: {targetVersion: true}}));
+checkFCV(adminDB, latestFCV);
- // Updating the featureCompatibilityVersion document with an invalid version fails.
- assert.writeErrorWithCode(adminDB.system.version.update({_id: "featureCompatibilityVersion"},
- {$set: {version: "3.2"}}),
- ErrorCodes.BadValue);
- checkFCV(adminDB, latestFCV);
+// Updating the featureCompatibilityVersion document with an invalid version fails.
+assert.writeErrorWithCode(
+ adminDB.system.version.update({_id: "featureCompatibilityVersion"}, {$set: {version: "3.2"}}),
+ ErrorCodes.BadValue);
+checkFCV(adminDB, latestFCV);
- // Updating the featureCompatibilityVersion document with an invalid targetVersion fails.
- assert.writeErrorWithCode(adminDB.system.version.update({_id: "featureCompatibilityVersion"},
- {$set: {targetVersion: lastStableFCV}}),
- ErrorCodes.BadValue);
- checkFCV(adminDB, latestFCV);
+// Updating the featureCompatibilityVersion document with an invalid targetVersion fails.
+assert.writeErrorWithCode(adminDB.system.version.update({_id: "featureCompatibilityVersion"},
+ {$set: {targetVersion: lastStableFCV}}),
+ ErrorCodes.BadValue);
+checkFCV(adminDB, latestFCV);
- assert.writeErrorWithCode(adminDB.system.version.update({_id: "featureCompatibilityVersion"},
- {$set: {targetVersion: latestFCV}}),
- ErrorCodes.BadValue);
- checkFCV(adminDB, latestFCV);
+assert.writeErrorWithCode(adminDB.system.version.update({_id: "featureCompatibilityVersion"},
+ {$set: {targetVersion: latestFCV}}),
+ ErrorCodes.BadValue);
+checkFCV(adminDB, latestFCV);
- MongoRunner.stopMongod(conn);
+MongoRunner.stopMongod(conn);
}());