data: - {_id: 1, x: 11} - {_id: 2, x: 22} - {_id: 3, x: 33} tests: - description: "BulkWrite replaceOne prohibits atomic modifiers" operations: - name: "bulkWrite" arguments: requests: - name: "replaceOne" arguments: filter: { _id: 1 } # Only the first field is tested, as the spec permits drivers to # only check that and rely on the server to check subsequent # fields. replacement: { $set: { x: 22 }} error: true expectations: [] outcome: collection: data: - {_id: 1, x: 11 } - {_id: 2, x: 22 } - {_id: 3, x: 33 } - description: "BulkWrite updateOne requires atomic modifiers" operations: - name: "bulkWrite" arguments: requests: - name: "updateOne" arguments: filter: { _id: 1 } # Only the first field is tested, as the spec permits drivers to # only check that and rely on the server to check subsequent # fields. update: { x: 22 } error: true expectations: [] outcome: collection: data: - {_id: 1, x: 11 } - {_id: 2, x: 22 } - {_id: 3, x: 33 } - description: "BulkWrite updateMany requires atomic modifiers" operations: - name: "bulkWrite" arguments: requests: - name: "updateMany" arguments: filter: { _id: { $gt: 1 }} # Only the first field is tested, as the spec permits drivers to # only check that and rely on the server to check subsequent # fields. update: { x: 44 } error: true expectations: [] outcome: collection: data: - {_id: 1, x: 11 } - {_id: 2, x: 22 } - {_id: 3, x: 33 }