summaryrefslogtreecommitdiff
path: root/jstests/readonly/write_ops.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/readonly/write_ops.js')
-rw-r--r--jstests/readonly/write_ops.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/jstests/readonly/write_ops.js b/jstests/readonly/write_ops.js
index a5d43077cbc..03740041abc 100644
--- a/jstests/readonly/write_ops.js
+++ b/jstests/readonly/write_ops.js
@@ -1,5 +1,8 @@
load("jstests/readonly/lib/read_only_test.js");
-
+/*
+ * TODO SERVER-45483: The write command should only be returning an
+ * IlegalOperation
+ */
runReadOnlyTest(function() {
'use strict';
return {
@@ -11,19 +14,19 @@ runReadOnlyTest(function() {
// Test that insert fails.
assert.writeErrorWithCode(
readableCollection.insert({x: 2}),
- ErrorCodes.IllegalOperation,
+ [ErrorCodes.IllegalOperation, ErrorCodes.MultipleErrorsOccurred],
"Expected insert to fail because database is in read-only mode");
// Test that delete fails.
assert.writeErrorWithCode(
readableCollection.remove({x: 1}),
- ErrorCodes.IllegalOperation,
+ [ErrorCodes.IllegalOperation, ErrorCodes.MultipleErrorsOccurred],
"Expected remove to fail because database is in read-only mode");
// Test that update fails.
assert.writeErrorWithCode(
readableCollection.update({_id: 0}, {$inc: {x: 1}}),
- ErrorCodes.IllegalOperation,
+ [ErrorCodes.IllegalOperation, ErrorCodes.MultipleErrorsOccurred],
"Expected update to fail because database is in read-only mode");
}
};