diff options
Diffstat (limited to 'jstests/noPassthrough/standalone_replication_recovery.js')
-rw-r--r-- | jstests/noPassthrough/standalone_replication_recovery.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/noPassthrough/standalone_replication_recovery.js b/jstests/noPassthrough/standalone_replication_recovery.js index 6ee47fc9c20..55a6bb8e00c 100644 --- a/jstests/noPassthrough/standalone_replication_recovery.js +++ b/jstests/noPassthrough/standalone_replication_recovery.js @@ -79,6 +79,9 @@ node = rst.start(node, {noReplSet: true, setParameter: {logComponentVerbosity: l reconnect(node); assertDocsInColl(node, []); +// Test that we can run the validate command on a standalone. +assert.commandWorked(node.getDB(dbName).runCommand({"validate": collName})); + jsTestLog("Test that on restart with the flag set we play recovery."); node = rst.restart(node, { noReplSet: true, @@ -87,6 +90,9 @@ node = rst.restart(node, { reconnect(node); assertDocsInColl(node, [3, 4, 5]); +// Test that we can run the validate command on a standalone that recovered. +assert.commandWorked(node.getDB(dbName).runCommand({"validate": collName})); + jsTestLog("Test that we go into read-only mode."); assert.commandFailedWithCode(getColl(node).insert({_id: 1}), ErrorCodes.IllegalOperation); |