diff --git a/source/crud/tests/README.rst b/source/crud/tests/README.rst index 9e38b3f768..b3d2512995 100644 --- a/source/crud/tests/README.rst +++ b/source/crud/tests/README.rst @@ -21,12 +21,12 @@ Subdirectories for Test Formats This document describes a legacy format for CRUD tests: legacy-v1, which dates back to the first version of the CRUD specification. New CRUD tests should be written -in the `unified test format <../../../../unified-test-format/unified-test-format.rst>`_ +in the `unified test format <../../unified-test-format/unified-test-format.rst>`_ and placed under ``unified/``. Until such time that all original tests have been ported to the unified test format, tests in each format will be grouped in their own subdirectory: - ``v1/``: Legacy-v1 format tests -- ``unified/``: Tests using the `unified test format <../../../../unified-test-format/unified-test-format.rst>`_ +- ``unified/``: Tests using the `unified test format <../../unified-test-format/unified-test-format.rst>`_ Since some drivers may not have a unified test runner capable of executing tests in all two formats, segregating tests in this manner will make it easier for @@ -52,11 +52,13 @@ single operation. Notable differences from the legacy-v2 format are as follows: fields. - Instead of a top-level ``runOn`` field, server requirements are denoted by - separate top-level ``minServerVersion`` and ``maxServerVersion`` fields. The - minimum server version is an inclusive lower bound for running the test. The - maximum server version is an exclusive upper bound for running the test. If a - field is not present, it should be assumed that there is no corresponding bound - on the required server version. + separate top-level ``minServerVersion``, ``maxServerVersion``, and + ``serverless`` fields. The minimum server version is an inclusive lower bound + for running the test. The maximum server version is an exclusive upper bound + for running the test. If a field is not present, it should be assumed that + there is no corresponding bound on the required server version. The + ``serverless`` requirement behaves the same as the ``serverless`` field of the + `unified test format's runOnRequirement <../../unified-test-format/unified-test-format.rst#runonrequirement>`_. The legacy-v1 format should not conflict with the newer, multi-operation format used by other specs (e.g. Transactions). It is possible to create a unified test diff --git a/source/crud/tests/v1/read/aggregate-collation.json b/source/crud/tests/v1/read/aggregate-collation.json index 85662a442f..d958e447bf 100644 --- a/source/crud/tests/v1/read/aggregate-collation.json +++ b/source/crud/tests/v1/read/aggregate-collation.json @@ -6,6 +6,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "Aggregate with collation", diff --git a/source/crud/tests/v1/read/aggregate-collation.yml b/source/crud/tests/v1/read/aggregate-collation.yml index 9aa67f17be..24cafd24bf 100644 --- a/source/crud/tests/v1/read/aggregate-collation.yml +++ b/source/crud/tests/v1/read/aggregate-collation.yml @@ -1,6 +1,7 @@ data: - {_id: 1, x: 'ping'} minServerVersion: '3.4' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/read/aggregate-out.json b/source/crud/tests/v1/read/aggregate-out.json index 4e33f9288f..c195e163e0 100644 --- a/source/crud/tests/v1/read/aggregate-out.json +++ b/source/crud/tests/v1/read/aggregate-out.json @@ -14,6 +14,7 @@ } ], "minServerVersion": "2.6", + "serverless": "forbid", "tests": [ { "description": "Aggregate with $out", diff --git a/source/crud/tests/v1/read/aggregate-out.yml b/source/crud/tests/v1/read/aggregate-out.yml index 893b7fe44b..d6688dd08d 100644 --- a/source/crud/tests/v1/read/aggregate-out.yml +++ b/source/crud/tests/v1/read/aggregate-out.yml @@ -3,6 +3,7 @@ data: - {_id: 2, x: 22} - {_id: 3, x: 33} minServerVersion: '2.6' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/read/count-collation.json b/source/crud/tests/v1/read/count-collation.json index 6f75282fe0..7d61508493 100644 --- a/source/crud/tests/v1/read/count-collation.json +++ b/source/crud/tests/v1/read/count-collation.json @@ -6,6 +6,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "Count documents with collation", diff --git a/source/crud/tests/v1/read/count-collation.yml b/source/crud/tests/v1/read/count-collation.yml index c5100f9af6..02da74c6b0 100644 --- a/source/crud/tests/v1/read/count-collation.yml +++ b/source/crud/tests/v1/read/count-collation.yml @@ -1,6 +1,7 @@ data: - {_id: 1, x: 'PING'} minServerVersion: '3.4' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/read/distinct-collation.json b/source/crud/tests/v1/read/distinct-collation.json index 0af0c67cb7..984991a43b 100644 --- a/source/crud/tests/v1/read/distinct-collation.json +++ b/source/crud/tests/v1/read/distinct-collation.json @@ -10,6 +10,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "Distinct with a collation", diff --git a/source/crud/tests/v1/read/distinct-collation.yml b/source/crud/tests/v1/read/distinct-collation.yml index 91e0f2db49..33b57d9927 100644 --- a/source/crud/tests/v1/read/distinct-collation.yml +++ b/source/crud/tests/v1/read/distinct-collation.yml @@ -2,6 +2,7 @@ data: - {_id: 1, string: 'PING'} - {_id: 2, string: 'ping'} minServerVersion: '3.4' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/read/find-collation.json b/source/crud/tests/v1/read/find-collation.json index 53d0e94900..4e56c05253 100644 --- a/source/crud/tests/v1/read/find-collation.json +++ b/source/crud/tests/v1/read/find-collation.json @@ -6,6 +6,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "Find with a collation", diff --git a/source/crud/tests/v1/read/find-collation.yml b/source/crud/tests/v1/read/find-collation.yml index e058c7aff2..baac5add49 100644 --- a/source/crud/tests/v1/read/find-collation.yml +++ b/source/crud/tests/v1/read/find-collation.yml @@ -1,6 +1,7 @@ data: - {_id: 1, x: 'ping'} minServerVersion: '3.4' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/write/bulkWrite-collation.json b/source/crud/tests/v1/write/bulkWrite-collation.json index 8e9d1bcb1a..bc90aa8172 100644 --- a/source/crud/tests/v1/write/bulkWrite-collation.json +++ b/source/crud/tests/v1/write/bulkWrite-collation.json @@ -22,6 +22,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "BulkWrite with delete operations and collation", diff --git a/source/crud/tests/v1/write/bulkWrite-collation.yml b/source/crud/tests/v1/write/bulkWrite-collation.yml index 1b4d7d1635..5aff22eed1 100644 --- a/source/crud/tests/v1/write/bulkWrite-collation.yml +++ b/source/crud/tests/v1/write/bulkWrite-collation.yml @@ -6,6 +6,7 @@ data: - {_id: 5, x: 'pONg'} minServerVersion: '3.4' +serverless: 'forbid' # See: https://docs.mongodb.com/manual/reference/collation/#collation-document tests: diff --git a/source/crud/tests/v1/write/deleteMany-collation.json b/source/crud/tests/v1/write/deleteMany-collation.json index d17bf3bcb9..fce75e488a 100644 --- a/source/crud/tests/v1/write/deleteMany-collation.json +++ b/source/crud/tests/v1/write/deleteMany-collation.json @@ -14,6 +14,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "DeleteMany when many documents match with collation", diff --git a/source/crud/tests/v1/write/deleteMany-collation.yml b/source/crud/tests/v1/write/deleteMany-collation.yml index 1a9d0e103f..2b0ef9db94 100644 --- a/source/crud/tests/v1/write/deleteMany-collation.yml +++ b/source/crud/tests/v1/write/deleteMany-collation.yml @@ -3,6 +3,7 @@ data: - {_id: 2, x: 'ping'} - {_id: 3, x: 'pINg'} minServerVersion: '3.4' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/write/deleteOne-collation.json b/source/crud/tests/v1/write/deleteOne-collation.json index 2f7f921130..9bcef411ef 100644 --- a/source/crud/tests/v1/write/deleteOne-collation.json +++ b/source/crud/tests/v1/write/deleteOne-collation.json @@ -14,6 +14,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "DeleteOne when many documents matches with collation", diff --git a/source/crud/tests/v1/write/deleteOne-collation.yml b/source/crud/tests/v1/write/deleteOne-collation.yml index 15ddf2e350..d37ecf76de 100644 --- a/source/crud/tests/v1/write/deleteOne-collation.yml +++ b/source/crud/tests/v1/write/deleteOne-collation.yml @@ -3,6 +3,7 @@ data: - {_id: 2, x: 'ping'} - {_id: 3, x: 'pINg'} minServerVersion: '3.4' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/write/findOneAndDelete-collation.json b/source/crud/tests/v1/write/findOneAndDelete-collation.json index 1ff37d2e88..32480da842 100644 --- a/source/crud/tests/v1/write/findOneAndDelete-collation.json +++ b/source/crud/tests/v1/write/findOneAndDelete-collation.json @@ -14,6 +14,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "FindOneAndDelete when one document matches with collation", diff --git a/source/crud/tests/v1/write/findOneAndDelete-collation.yml b/source/crud/tests/v1/write/findOneAndDelete-collation.yml index 1ece7076dd..5f13b7e5b7 100644 --- a/source/crud/tests/v1/write/findOneAndDelete-collation.yml +++ b/source/crud/tests/v1/write/findOneAndDelete-collation.yml @@ -3,6 +3,7 @@ data: - {_id: 2, x: 'ping'} - {_id: 3, x: 'pINg'} minServerVersion: '3.4' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/write/findOneAndReplace-collation.json b/source/crud/tests/v1/write/findOneAndReplace-collation.json index babb2f7c11..9b3c25005b 100644 --- a/source/crud/tests/v1/write/findOneAndReplace-collation.json +++ b/source/crud/tests/v1/write/findOneAndReplace-collation.json @@ -10,6 +10,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "FindOneAndReplace when one document matches with collation returning the document after modification", diff --git a/source/crud/tests/v1/write/findOneAndReplace-collation.yml b/source/crud/tests/v1/write/findOneAndReplace-collation.yml index 446664ad2b..206ac829c8 100644 --- a/source/crud/tests/v1/write/findOneAndReplace-collation.yml +++ b/source/crud/tests/v1/write/findOneAndReplace-collation.yml @@ -2,6 +2,7 @@ data: - {_id: 1, x: 11} - {_id: 2, x: 'ping'} minServerVersion: '3.4' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/write/findOneAndUpdate-collation.json b/source/crud/tests/v1/write/findOneAndUpdate-collation.json index 04c1fe73ec..8abab7bd6b 100644 --- a/source/crud/tests/v1/write/findOneAndUpdate-collation.json +++ b/source/crud/tests/v1/write/findOneAndUpdate-collation.json @@ -14,6 +14,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "FindOneAndUpdate when many documents match with collation returning the document before modification", diff --git a/source/crud/tests/v1/write/findOneAndUpdate-collation.yml b/source/crud/tests/v1/write/findOneAndUpdate-collation.yml index 6b1840d10a..1c50e86be8 100644 --- a/source/crud/tests/v1/write/findOneAndUpdate-collation.yml +++ b/source/crud/tests/v1/write/findOneAndUpdate-collation.yml @@ -3,6 +3,7 @@ data: - {_id: 2, x: 'ping'} - {_id: 3, x: 'pINg'} minServerVersion: '3.4' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/write/replaceOne-collation.json b/source/crud/tests/v1/write/replaceOne-collation.json index a668fe7383..fa4cbe9970 100644 --- a/source/crud/tests/v1/write/replaceOne-collation.json +++ b/source/crud/tests/v1/write/replaceOne-collation.json @@ -10,6 +10,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "ReplaceOne when one document matches with collation", diff --git a/source/crud/tests/v1/write/replaceOne-collation.yml b/source/crud/tests/v1/write/replaceOne-collation.yml index d176c26ff5..715cdce844 100644 --- a/source/crud/tests/v1/write/replaceOne-collation.yml +++ b/source/crud/tests/v1/write/replaceOne-collation.yml @@ -2,6 +2,7 @@ data: - {_id: 1, x: 11} - {_id: 2, x: 'ping'} minServerVersion: '3.4' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/write/updateMany-collation.json b/source/crud/tests/v1/write/updateMany-collation.json index 3cb49f2298..8becfd806b 100644 --- a/source/crud/tests/v1/write/updateMany-collation.json +++ b/source/crud/tests/v1/write/updateMany-collation.json @@ -14,6 +14,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "UpdateMany when many documents match with collation", diff --git a/source/crud/tests/v1/write/updateMany-collation.yml b/source/crud/tests/v1/write/updateMany-collation.yml index 6570a43965..5a7048f09a 100644 --- a/source/crud/tests/v1/write/updateMany-collation.yml +++ b/source/crud/tests/v1/write/updateMany-collation.yml @@ -3,6 +3,7 @@ data: - {_id: 2, x: 'ping'} - {_id: 3, x: 'pINg'} minServerVersion: '3.4' +serverless: 'forbid' tests: - diff --git a/source/crud/tests/v1/write/updateOne-collation.json b/source/crud/tests/v1/write/updateOne-collation.json index c49112d519..3afdb83e0f 100644 --- a/source/crud/tests/v1/write/updateOne-collation.json +++ b/source/crud/tests/v1/write/updateOne-collation.json @@ -10,6 +10,7 @@ } ], "minServerVersion": "3.4", + "serverless": "forbid", "tests": [ { "description": "UpdateOne when one document matches with collation", diff --git a/source/crud/tests/v1/write/updateOne-collation.yml b/source/crud/tests/v1/write/updateOne-collation.yml index 95ad6b12c9..0132152b09 100644 --- a/source/crud/tests/v1/write/updateOne-collation.yml +++ b/source/crud/tests/v1/write/updateOne-collation.yml @@ -2,6 +2,7 @@ data: - {_id: 1, x: 11} - {_id: 2, x: 'ping'} minServerVersion: '3.4' +serverless: 'forbid' tests: -