Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRIVERS-2855: Convert default write concern tests to unified format #1547

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading