-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Server Tooling & Methods
-
ALL
-
assert.commandWorkedOrFailedWithCode() calls assert.commandWorked() if a command result has "ok : 1" field or assert.commandFailedWithCode() if not.
In the case of a write error, where the response has both "ok: 1" and one or more errors reported in a "writeErrors" subdocument, assert.commandWorked() will be called which then asserts when the write error is encountered, regardless of whether the code is in the set passed to assert.commandWorkedOrFailedWithCode().