Skip to content

Commit

Permalink
DRIVERS-2855: Convert default write concern tests to unified format (#…
Browse files Browse the repository at this point in the history
…1547)

Add read-write-concern to unified test format Makefile
  • Loading branch information
jmikola authored Mar 12, 2024
1 parent 89ff246 commit bfb6a84
Show file tree
Hide file tree
Showing 10 changed files with 1,260 additions and 861 deletions.
14 changes: 1 addition & 13 deletions source/read-write-concern/tests/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,7 @@ Operation

These tests check that the default write concern is omitted in operations.

The spec test format is an extension of the `transactions spec legacy test format <../../transactions/tests/legacy-test-format.md>`__ with the following additions:

- ``writeConcern`` in the ``databaseOptions`` or ``collectionOptions`` may be an empty document to indicate a `server default write concern <https://github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.rst#servers-default-writeconcern>`_. For example, in libmongoc:

.. code:: c
/* Create a default write concern, and set on a collection object. */
mongoc_write_concern_t *wc = mongoc_write_concern_new ();
mongoc_collection_set_write_concern (collection, wc);
If the driver has no way to explicitly set a default write concern on a database or collection, ignore the empty ``writeConcern`` document and continue with the test.
- The operations ``createIndex``, ``dropIndex`` are introduced.

The tests utilize the `Unified Test Format <../../unified-test-format/unified-test-format.md>`__.

Use as unit tests
=================
Expand Down
Loading

0 comments on commit bfb6a84

Please sign in to comment.