PYTHON-2600 Resync spec tests for versioned api (#599)
Also resolves PYTHON-2599 and PYTHON-2641.
This commit is contained in:
parent
fac0372ba0
commit
cd823c8ed1
@ -1944,11 +1944,11 @@ axes:
|
||||
REQUIRE_API_VERSION: "1"
|
||||
# MONGODB_API_VERSION is the apiVersion to use in the test suite.
|
||||
MONGODB_API_VERSION: "1"
|
||||
# Test against a cluster with acceptAPIVersion2 but without
|
||||
# Test against a cluster with acceptApiVersion2 but without
|
||||
# requireApiVersion, and don't automatically add apiVersion to
|
||||
# clients created in the test suite.
|
||||
- id: "acceptAPIVersion2"
|
||||
display_name: "acceptAPIVersion2"
|
||||
- id: "acceptApiVersion2"
|
||||
display_name: "acceptApiVersion2"
|
||||
tags: [ "versionedApi_tag" ]
|
||||
variables:
|
||||
ORCHESTRATION_FILE: "versioned-api-testing.json"
|
||||
@ -2434,7 +2434,7 @@ buildvariants:
|
||||
|
||||
- matrix_name: "versioned-api-tests"
|
||||
matrix_spec:
|
||||
platform: ubuntu-16.04
|
||||
platform: ubuntu-18.04
|
||||
python-version: ["3.6", "3.9"]
|
||||
auth: "auth"
|
||||
versionedApi: "*"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"schemaVersion": "1.1",
|
||||
"runOnRequirements": [
|
||||
{
|
||||
"minServerVersion": "4.7",
|
||||
"minServerVersion": "4.9",
|
||||
"serverParameters": {
|
||||
"requireApiVersion": false
|
||||
}
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
"schemaVersion": "1.1",
|
||||
"runOnRequirements": [
|
||||
{
|
||||
"minServerVersion": "4.7",
|
||||
"minServerVersion": "4.9",
|
||||
"serverParameters": {
|
||||
"enableTestCommands": true,
|
||||
"acceptAPIVersion2": true,
|
||||
"acceptApiVersion2": true,
|
||||
"requireApiVersion": false
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"schemaVersion": "1.1",
|
||||
"runOnRequirements": [
|
||||
{
|
||||
"minServerVersion": "4.7",
|
||||
"minServerVersion": "4.9",
|
||||
"serverParameters": {
|
||||
"enableTestCommands": true
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"schemaVersion": "1.1",
|
||||
"runOnRequirements": [
|
||||
{
|
||||
"minServerVersion": "4.7",
|
||||
"minServerVersion": "4.9",
|
||||
"topologies": [
|
||||
"replicaset",
|
||||
"sharded-replicaset"
|
||||
@ -382,7 +382,138 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "abortTransaction does not include an API version",
|
||||
"runOnRequirements": [
|
||||
{
|
||||
"topologies": [
|
||||
"replicaset",
|
||||
"sharded-replicaset"
|
||||
]
|
||||
}
|
||||
],
|
||||
"operations": [
|
||||
{
|
||||
"name": "startTransaction",
|
||||
"object": "session"
|
||||
},
|
||||
{
|
||||
"name": "insertOne",
|
||||
"object": "collection",
|
||||
"arguments": {
|
||||
"session": "session",
|
||||
"document": {
|
||||
"_id": 6,
|
||||
"x": 66
|
||||
}
|
||||
},
|
||||
"expectResult": {
|
||||
"$$unsetOrMatches": {
|
||||
"insertedId": {
|
||||
"$$unsetOrMatches": 6
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "insertOne",
|
||||
"object": "collection",
|
||||
"arguments": {
|
||||
"session": "session",
|
||||
"document": {
|
||||
"_id": 7,
|
||||
"x": 77
|
||||
}
|
||||
},
|
||||
"expectResult": {
|
||||
"$$unsetOrMatches": {
|
||||
"insertedId": {
|
||||
"$$unsetOrMatches": 7
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "abortTransaction",
|
||||
"object": "session"
|
||||
}
|
||||
],
|
||||
"expectEvents": [
|
||||
{
|
||||
"client": "client",
|
||||
"events": [
|
||||
{
|
||||
"commandStartedEvent": {
|
||||
"command": {
|
||||
"insert": "test",
|
||||
"documents": [
|
||||
{
|
||||
"_id": 6,
|
||||
"x": 66
|
||||
}
|
||||
],
|
||||
"lsid": {
|
||||
"$$sessionLsid": "session"
|
||||
},
|
||||
"startTransaction": true,
|
||||
"apiVersion": "1",
|
||||
"apiStrict": {
|
||||
"$$unsetOrMatches": false
|
||||
},
|
||||
"apiDeprecationErrors": {
|
||||
"$$unsetOrMatches": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"commandStartedEvent": {
|
||||
"command": {
|
||||
"insert": "test",
|
||||
"documents": [
|
||||
{
|
||||
"_id": 7,
|
||||
"x": 77
|
||||
}
|
||||
],
|
||||
"lsid": {
|
||||
"$$sessionLsid": "session"
|
||||
},
|
||||
"apiVersion": {
|
||||
"$$exists": false
|
||||
},
|
||||
"apiStrict": {
|
||||
"$$exists": false
|
||||
},
|
||||
"apiDeprecationErrors": {
|
||||
"$$exists": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"commandStartedEvent": {
|
||||
"command": {
|
||||
"abortTransaction": 1,
|
||||
"lsid": {
|
||||
"$$sessionLsid": "session"
|
||||
},
|
||||
"apiVersion": {
|
||||
"$$exists": false
|
||||
},
|
||||
"apiStrict": {
|
||||
"$$exists": false
|
||||
},
|
||||
"apiDeprecationErrors": {
|
||||
"$$exists": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user