HEX
Server: LiteSpeed
System: Linux br-asc-web1845.main-hosting.eu 5.14.0-611.42.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 24 05:30:20 EDT 2026 x86_64
User: u790421558 (790421558)
PHP: 8.2.30
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/go/pkg/mod/go.mongodb.org/mongo-driver@v1.13.1/testdata/versioned-api/README.rst
===================
Versioned API Tests
===================

.. contents::

----

Notes
=====

This directory contains tests for the Versioned API specification. They are
implemented in the `Unified Test Format <../../unified-test-format/unified-test-format.rst>`__,
and require schema version 1.1. Note that to run these tests, the server must be
started with both ``enableTestCommands`` and ``acceptApiVersion2`` parameters
set to true.

Testing with required API version
=================================

Drivers MUST run their test suite against a cluster with the
``requireApiVersion`` parameter enabled and also requires authentication.

To run this test, proceed as follows:
- Start a standalone mongod instance

- Connect to the standalone instance and run the following command on the
  ``admin`` database: ``{ setParameter: 1, requireApiVersion: true }``

- Declare an API version for the test run through the ``MONGODB_API_VERSION``
  environment variable.

- If the environment variable is set, all clients created in tests MUST declare
  the ``ServerApiVersion`` specified.

No other topologies must be tested until ``mongo-orchestration`` can handle
servers with ``requireApiVersion`` enabled.