summaryrefslogtreecommitdiff
path: root/jstests/replsets/uninitialized_fcv_access.js
diff options
context:
space:
mode:
authorclang-format-7.0.1 <adam.martin@10gen.com>2019-07-26 18:20:35 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-07-27 11:02:23 -0400
commit134a4083953270e8a11430395357fb70a29047ad (patch)
treedd428e1230e31d92b20b393dfdc17ffe7fa79cb6 /jstests/replsets/uninitialized_fcv_access.js
parent1e46b5049003f427047e723ea5fab15b5a9253ca (diff)
downloadmongo-134a4083953270e8a11430395357fb70a29047ad.tar.gz
SERVER-41772 Apply clang-format 7.0.1 to the codebase
Diffstat (limited to 'jstests/replsets/uninitialized_fcv_access.js')
-rw-r--r--jstests/replsets/uninitialized_fcv_access.js41
1 files changed, 22 insertions, 19 deletions
diff --git a/jstests/replsets/uninitialized_fcv_access.js b/jstests/replsets/uninitialized_fcv_access.js
index f4cdfae7674..dd2ff681e4c 100644
--- a/jstests/replsets/uninitialized_fcv_access.js
+++ b/jstests/replsets/uninitialized_fcv_access.js
@@ -3,30 +3,33 @@
* initialized does not crash the server (see SERVER-34600).
*/
(function() {
- 'use strict';
- load('jstests/libs/feature_compatibility_version.js');
+'use strict';
+load('jstests/libs/feature_compatibility_version.js');
- let rst = new ReplSetTest({nodes: 2});
- rst.startSet();
- let node = rst.nodes[0];
+let rst = new ReplSetTest({nodes: 2});
+rst.startSet();
+let node = rst.nodes[0];
- // The featureCompatibilityVersion parameter is initialized during rst.initiate(), so calling
- // getParameter on the fCV before then will attempt to access an uninitialized fCV.
+// The featureCompatibilityVersion parameter is initialized during rst.initiate(), so calling
+// getParameter on the fCV before then will attempt to access an uninitialized fCV.
- const getParamCmd = {getParameter: 1, featureCompatibilityVersion: 1};
- assert.commandFailedWithCode(node.getDB('admin').runCommand(getParamCmd),
- ErrorCodes.UnknownFeatureCompatibilityVersion,
- 'expected ' + tojson(getParamCmd) +
- ' to fail with code UnknownFeatureCompatibilityVersion');
+const getParamCmd = {
+ getParameter: 1,
+ featureCompatibilityVersion: 1
+};
+assert.commandFailedWithCode(
+ node.getDB('admin').runCommand(getParamCmd),
+ ErrorCodes.UnknownFeatureCompatibilityVersion,
+ 'expected ' + tojson(getParamCmd) + ' to fail with code UnknownFeatureCompatibilityVersion');
- rst.initiate();
+rst.initiate();
- // After the replica set is initialized, getParameter should successfully return the fCV.
+// After the replica set is initialized, getParameter should successfully return the fCV.
- const primary = rst.getPrimary();
- const res = primary.adminCommand(getParamCmd);
- assert.commandWorked(res);
- assert.eq(res.featureCompatibilityVersion.version, latestFCV, tojson(res));
+const primary = rst.getPrimary();
+const res = primary.adminCommand(getParamCmd);
+assert.commandWorked(res);
+assert.eq(res.featureCompatibilityVersion.version, latestFCV, tojson(res));
- rst.stopSet();
+rst.stopSet();
})();