summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js
diff options
context:
space:
mode:
authorLingzhi Deng <lingzhi.deng@mongodb.com>2020-07-06 14:36:42 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-07-15 20:07:53 +0000
commit5446d926d8d21f3dd583b26980308519a2b67708 (patch)
tree9c9c05dcc1b669a587db47e57ba9aa47d84b0c10 /jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js
parentc26b0c167e8db6506e547e1daaa51f09a6e6c1bd (diff)
downloadmongo-5446d926d8d21f3dd583b26980308519a2b67708.tar.gz
SERVER-49269: Add 'previousVersion' field to FCV document when in downgrading states
Diffstat (limited to 'jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js')
-rw-r--r--jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js b/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js
index 7dcc280c066..9cace458341 100644
--- a/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js
+++ b/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js
@@ -36,10 +36,10 @@ assert.eq(res.minWireVersion, res.maxWireVersion, tojson(res));
// When the featureCompatibilityVersion is downgrading, running isMaster with internalClient
// returns minWireVersion == maxWireVersion.
-assert.commandWorked(
- adminDB.system.version.update({_id: "featureCompatibilityVersion"},
- {$set: {version: lastStableFCV, targetVersion: lastStableFCV}},
- {writeConcern: {w: 1}}));
+assert.commandWorked(adminDB.system.version.update(
+ {_id: "featureCompatibilityVersion"},
+ {$set: {version: lastStableFCV, targetVersion: lastStableFCV, previousVersion: latestFCV}},
+ {writeConcern: {w: 1}}));
res = adminDB.runCommand(isMasterCommand);
assert.commandWorked(res);
assert.eq(res.minWireVersion, res.maxWireVersion, tojson(res));