...
1description: "deleteOne-errorResponse"
2
3schemaVersion: "1.12"
4
5createEntities:
6 - client:
7 id: &client0 client0
8 useMultipleMongoses: false
9 - database:
10 id: &database0 database0
11 client: *client0
12 databaseName: &database0Name crud-tests
13 - collection:
14 id: &collection0 collection0
15 database: *database0
16 collectionName: &collection0Name test
17
18tests:
19 # Some drivers may still need to skip this test because the CRUD spec does not
20 # prescribe how drivers should formulate a WriteException beyond collecting a
21 # write or write concern error.
22 - description: "delete operations support errorResponse assertions"
23 runOnRequirements:
24 - minServerVersion: "4.0.0"
25 topologies: [ single, replicaset ]
26 - minServerVersion: "4.2.0"
27 topologies: [ sharded ]
28 operations:
29 - name: failPoint
30 object: testRunner
31 arguments:
32 client: *client0
33 failPoint:
34 configureFailPoint: failCommand
35 mode: { times: 1 }
36 data:
37 failCommands: [ delete ]
38 errorCode: &errorCode 8 # UnknownError
39 - name: deleteOne
40 object: *collection0
41 arguments:
42 filter: { _id: 1 }
43 expectError:
44 errorCode: *errorCode
45 errorResponse:
46 code: *errorCode
View as plain text