Skip to content

Commit a518473

Browse files
committed
PHPLIB-655: Sync Versioned API tests
Synced with mongodb/specifications@72249aa
1 parent bf6da6c commit a518473

File tree

6 files changed

+53
-212
lines changed

6 files changed

+53
-212
lines changed

tests/UnifiedSpecTests/versioned-api/crud-api-version-1-strict.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"description": "CRUD Api Version 1 (strict)",
3-
"schemaVersion": "1.1",
3+
"schemaVersion": "1.4",
44
"runOnRequirements": [
55
{
66
"minServerVersion": "4.9"
@@ -141,6 +141,11 @@
141141
},
142142
{
143143
"description": "aggregate on database appends declared API version",
144+
"runOnRequirements": [
145+
{
146+
"serverless": "forbid"
147+
}
148+
],
144149
"operations": [
145150
{
146151
"name": "aggregate",
@@ -608,7 +613,6 @@
608613
},
609614
{
610615
"description": "estimatedDocumentCount appends declared API version",
611-
"skipReason": "DRIVERS-1561 collStats is not in API version 1",
612616
"operations": [
613617
{
614618
"name": "estimatedDocumentCount",
@@ -652,7 +656,7 @@
652656
]
653657
},
654658
{
655-
"description": "find command with declared API version appends to the command, but getMore does not",
659+
"description": "find and getMore append API version",
656660
"operations": [
657661
{
658662
"name": "find",
@@ -713,14 +717,10 @@
713717
"long"
714718
]
715719
},
716-
"apiVersion": {
717-
"$$exists": false
718-
},
719-
"apiStrict": {
720-
"$$exists": false
721-
},
720+
"apiVersion": "1",
721+
"apiStrict": true,
722722
"apiDeprecationErrors": {
723-
"$$exists": false
723+
"$$unsetOrMatches": false
724724
}
725725
}
726726
}

tests/UnifiedSpecTests/versioned-api/crud-api-version-1.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"description": "CRUD Api Version 1",
3-
"schemaVersion": "1.1",
3+
"schemaVersion": "1.4",
44
"runOnRequirements": [
55
{
66
"minServerVersion": "4.9"
@@ -141,6 +141,11 @@
141141
},
142142
{
143143
"description": "aggregate on database appends declared API version",
144+
"runOnRequirements": [
145+
{
146+
"serverless": "forbid"
147+
}
148+
],
144149
"operations": [
145150
{
146151
"name": "aggregate",
@@ -643,7 +648,7 @@
643648
]
644649
},
645650
{
646-
"description": "find command with declared API version appends to the command, but getMore does not",
651+
"description": "find and getMore append API version",
647652
"operations": [
648653
{
649654
"name": "find",
@@ -704,15 +709,11 @@
704709
"long"
705710
]
706711
},
707-
"apiVersion": {
708-
"$$exists": false
709-
},
712+
"apiVersion": "1",
710713
"apiStrict": {
711-
"$$exists": false
714+
"$$unsetOrMatches": false
712715
},
713-
"apiDeprecationErrors": {
714-
"$$exists": false
715-
}
716+
"apiDeprecationErrors": true
716717
}
717718
}
718719
}

tests/UnifiedSpecTests/versioned-api/runcommand-helper-no-api-version-declared.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"description": "RunCommand helper: No API version declared",
3-
"schemaVersion": "1.1",
3+
"schemaVersion": "1.4",
44
"runOnRequirements": [
55
{
66
"minServerVersion": "4.9",
@@ -29,6 +29,11 @@
2929
"tests": [
3030
{
3131
"description": "runCommand does not inspect or change the command document",
32+
"runOnRequirements": [
33+
{
34+
"serverless": "forbid"
35+
}
36+
],
3237
"operations": [
3338
{
3439
"name": "runCommand",
@@ -72,6 +77,11 @@
7277
},
7378
{
7479
"description": "runCommand does not prevent sending invalid API version declarations",
80+
"runOnRequirements": [
81+
{
82+
"serverless": "forbid"
83+
}
84+
],
7585
"operations": [
7686
{
7787
"name": "runCommand",

tests/UnifiedSpecTests/versioned-api/test-commands-deprecation-errors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"minServerVersion": "4.9",
77
"serverParameters": {
88
"enableTestCommands": true,
9-
"acceptAPIVersion2": true,
9+
"acceptApiVersion2": true,
1010
"requireApiVersion": false
1111
}
1212
}

tests/UnifiedSpecTests/versioned-api/test-commands-strict-mode.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"description": "Test commands: strict mode",
3-
"schemaVersion": "1.1",
3+
"schemaVersion": "1.4",
44
"runOnRequirements": [
55
{
66
"minServerVersion": "4.9",
77
"serverParameters": {
88
"enableTestCommands": true
9-
}
9+
},
10+
"serverless": "forbid"
1011
}
1112
],
1213
"createEntities": [

0 commit comments

Comments
 (0)