{
  "description": "client bulkWrite errorResponse",
  "schemaVersion": "1.12",
  "runOnRequirements": [
    {
      "minServerVersion": "8.0"
    }
  ],
  "createEntities": [
    {
      "client": {
        "id": "client0",
        "useMultipleMongoses": false
      }
    }
  ],
  "_yamlAnchors": {
    "namespace": "crud-tests.coll0"
  },
  "tests": [
    {
      "description": "client bulkWrite operations support errorResponse assertions",
      "operations": [
        {
          "name": "failPoint",
          "object": "testRunner",
          "arguments": {
            "client": "client0",
            "failPoint": {
              "configureFailPoint": "failCommand",
              "mode": {
                "times": 1
              },
              "data": {
                "failCommands": [
                  "bulkWrite"
                ],
                "errorCode": 8
              }
            }
          }
        },
        {
          "object": "client0",
          "name": "clientBulkWrite",
          "arguments": {
            "models": [
              {
                "insertOne": {
                  "namespace": "crud-tests.coll0",
                  "document": {
                    "_id": 1
                  }
                }
              }
            ]
          },
          "expectError": {
            "errorCode": 8,
            "errorResponse": {
              "code": 8
            }
          }
        }
      ]
    }
  ]
}
