Skip to content

Commit

Permalink
DRIVERS-1851 Skip crud-v1 tests for $out and collation on Serverless (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickfreed committed Jul 19, 2021
1 parent 58f669a commit a73bf05
Show file tree
Hide file tree
Showing 29 changed files with 37 additions and 7 deletions.
16 changes: 9 additions & 7 deletions source/crud/tests/README.rst
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/read/aggregate-collation.json
Expand Up @@ -6,6 +6,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "Aggregate with collation",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/read/aggregate-collation.yml
@@ -1,6 +1,7 @@
data:
- {_id: 1, x: 'ping'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/read/aggregate-out.json
Expand Up @@ -14,6 +14,7 @@
}
],
"minServerVersion": "2.6",
"serverless": "forbid",
"tests": [
{
"description": "Aggregate with $out",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/read/aggregate-out.yml
Expand Up @@ -3,6 +3,7 @@ data:
- {_id: 2, x: 22}
- {_id: 3, x: 33}
minServerVersion: '2.6'
serverless: 'forbid'

tests:
-
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/read/count-collation.json
Expand Up @@ -6,6 +6,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "Count documents with collation",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/read/count-collation.yml
@@ -1,6 +1,7 @@
data:
- {_id: 1, x: 'PING'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/read/distinct-collation.json
Expand Up @@ -10,6 +10,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "Distinct with a collation",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/read/distinct-collation.yml
Expand Up @@ -2,6 +2,7 @@ data:
- {_id: 1, string: 'PING'}
- {_id: 2, string: 'ping'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/read/find-collation.json
Expand Up @@ -6,6 +6,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "Find with a collation",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/read/find-collation.yml
@@ -1,6 +1,7 @@
data:
- {_id: 1, x: 'ping'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/bulkWrite-collation.json
Expand Up @@ -22,6 +22,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "BulkWrite with delete operations and collation",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/bulkWrite-collation.yml
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/deleteMany-collation.json
Expand Up @@ -14,6 +14,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "DeleteMany when many documents match with collation",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/deleteMany-collation.yml
Expand Up @@ -3,6 +3,7 @@ data:
- {_id: 2, x: 'ping'}
- {_id: 3, x: 'pINg'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/deleteOne-collation.json
Expand Up @@ -14,6 +14,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "DeleteOne when many documents matches with collation",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/deleteOne-collation.yml
Expand Up @@ -3,6 +3,7 @@ data:
- {_id: 2, x: 'ping'}
- {_id: 3, x: 'pINg'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/findOneAndDelete-collation.json
Expand Up @@ -14,6 +14,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "FindOneAndDelete when one document matches with collation",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/findOneAndDelete-collation.yml
Expand Up @@ -3,6 +3,7 @@ data:
- {_id: 2, x: 'ping'}
- {_id: 3, x: 'pINg'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down
Expand Up @@ -10,6 +10,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "FindOneAndReplace when one document matches with collation returning the document after modification",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/findOneAndReplace-collation.yml
Expand Up @@ -2,6 +2,7 @@ data:
- {_id: 1, x: 11}
- {_id: 2, x: 'ping'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/findOneAndUpdate-collation.json
Expand Up @@ -14,6 +14,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "FindOneAndUpdate when many documents match with collation returning the document before modification",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/findOneAndUpdate-collation.yml
Expand Up @@ -3,6 +3,7 @@ data:
- {_id: 2, x: 'ping'}
- {_id: 3, x: 'pINg'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/replaceOne-collation.json
Expand Up @@ -10,6 +10,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "ReplaceOne when one document matches with collation",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/replaceOne-collation.yml
Expand Up @@ -2,6 +2,7 @@ data:
- {_id: 1, x: 11}
- {_id: 2, x: 'ping'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/updateMany-collation.json
Expand Up @@ -14,6 +14,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "UpdateMany when many documents match with collation",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/updateMany-collation.yml
Expand Up @@ -3,6 +3,7 @@ data:
- {_id: 2, x: 'ping'}
- {_id: 3, x: 'pINg'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/updateOne-collation.json
Expand Up @@ -10,6 +10,7 @@
}
],
"minServerVersion": "3.4",
"serverless": "forbid",
"tests": [
{
"description": "UpdateOne when one document matches with collation",
Expand Down
1 change: 1 addition & 0 deletions source/crud/tests/v1/write/updateOne-collation.yml
Expand Up @@ -2,6 +2,7 @@ data:
- {_id: 1, x: 11}
- {_id: 2, x: 'ping'}
minServerVersion: '3.4'
serverless: 'forbid'

tests:
-
Expand Down

0 comments on commit a73bf05

Please sign in to comment.