...

Text file src/go.mongodb.org/mongo-driver/testdata/versioned-api/README.rst

Documentation: go.mongodb.org/mongo-driver/testdata/versioned-api

     1===================
     2Versioned API Tests
     3===================
     4
     5.. contents::
     6
     7----
     8
     9Notes
    10=====
    11
    12This directory contains tests for the Versioned API specification. They are
    13implemented in the `Unified Test Format <../../unified-test-format/unified-test-format.rst>`__,
    14and require schema version 1.1. Note that to run these tests, the server must be
    15started with both ``enableTestCommands`` and ``acceptApiVersion2`` parameters
    16set to true.
    17
    18Testing with required API version
    19=================================
    20
    21Drivers MUST run their test suite against a cluster with the
    22``requireApiVersion`` parameter enabled and also requires authentication.
    23
    24To run this test, proceed as follows:
    25- Start a standalone mongod instance
    26
    27- Connect to the standalone instance and run the following command on the
    28  ``admin`` database: ``{ setParameter: 1, requireApiVersion: true }``
    29
    30- Declare an API version for the test run through the ``MONGODB_API_VERSION``
    31  environment variable.
    32
    33- If the environment variable is set, all clients created in tests MUST declare
    34  the ``ServerApiVersion`` specified.
    35
    36No other topologies must be tested until ``mongo-orchestration`` can handle
    37servers with ``requireApiVersion`` enabled.

View as plain text