Skip to content

Commit a6d629f

Browse files
RUST-1879 Convert read/write concern operation tests to unified test format (#1168)
1 parent bb8d2ef commit a6d629f

15 files changed

+1313
-882
lines changed

src/test/spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mod sessions;
2424
#[cfg(feature = "tracing-unstable")]
2525
mod trace;
2626
mod transactions;
27-
pub mod unified_runner;
27+
pub(crate) mod unified_runner;
2828
mod v2_runner;
2929
mod versioned_api;
3030
mod write_error;

src/test/spec/json/read-write-concern/README.rst

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
=======================
2-
Connection String Tests
3-
=======================
1+
============================
2+
Read and Write Concern Tests
3+
============================
44

55
The YAML and JSON files in this directory tree are platform-independent tests
66
that drivers can use to prove their conformance to the Read and Write Concern
@@ -57,19 +57,7 @@ Operation
5757

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

60-
The spec test format is an extension of `transactions spec tests <https://github.com/mongodb/specifications/blob/master/source/transactions/tests/README.rst>`_ with the following additions:
61-
62-
- ``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:
63-
64-
.. code:: c
65-
66-
/* Create a default write concern, and set on a collection object. */
67-
mongoc_write_concern_t *wc = mongoc_write_concern_new ();
68-
mongoc_collection_set_write_concern (collection, wc);
69-
70-
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.
71-
- The operations ``createIndex``, ``dropIndex`` are introduced.
72-
60+
The tests utilize the `Unified Test Format <../../unified-test-format/unified-test-format.md>`__.
7361

7462
Use as unit tests
7563
=================

0 commit comments

Comments
 (0)