Skip to content

Commit 57cd7e0

Browse files
authored
PHPLIB-708: Sync unified test runner valid-fail tests (#858)
Synced with mongodb/specifications@73d1286
1 parent d4d7ac4 commit 57cd7e0

File tree

4 files changed

+93
-24
lines changed

4 files changed

+93
-24
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"description": "entity-findCursor-malformed",
3+
"schemaVersion": "1.3",
4+
"createEntities": [
5+
{
6+
"client": {
7+
"id": "client0"
8+
}
9+
},
10+
{
11+
"database": {
12+
"id": "database0",
13+
"client": "client0",
14+
"databaseName": "database0Name"
15+
}
16+
},
17+
{
18+
"collection": {
19+
"id": "collection0",
20+
"database": "database0",
21+
"collectionName": "coll0"
22+
}
23+
}
24+
],
25+
"initialData": [
26+
{
27+
"databaseName": "database0Name",
28+
"collectionName": "coll0",
29+
"documents": []
30+
}
31+
],
32+
"tests": [
33+
{
34+
"description": "createFindCursor fails if filter is not specified",
35+
"operations": [
36+
{
37+
"name": "createFindCursor",
38+
"object": "collection0",
39+
"saveResultAsEntity": "cursor0"
40+
}
41+
]
42+
}
43+
]
44+
}

tests/UnifiedSpecTests/valid-fail/entity-find-cursor.json renamed to tests/UnifiedSpecTests/valid-fail/entity-findCursor.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"description": "entity-find-cursor",
2+
"description": "entity-findCursor",
33
"schemaVersion": "1.3",
44
"createEntities": [
55
{
@@ -30,16 +30,6 @@
3030
}
3131
],
3232
"tests": [
33-
{
34-
"description": "createFindCursor fails if filter is not specified",
35-
"operations": [
36-
{
37-
"name": "createFindCursor",
38-
"object": "collection0",
39-
"saveResultAsEntity": "cursor0"
40-
}
41-
]
42-
},
4333
{
4434
"description": "iterateUntilDocumentOrError fails if it references a nonexistent entity",
4535
"operations": [
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"description": "ignoreResultAndError-malformed",
3+
"schemaVersion": "1.3",
4+
"createEntities": [
5+
{
6+
"client": {
7+
"id": "client0",
8+
"useMultipleMongoses": true
9+
}
10+
},
11+
{
12+
"database": {
13+
"id": "database0",
14+
"client": "client0",
15+
"databaseName": "database0Name"
16+
}
17+
},
18+
{
19+
"collection": {
20+
"id": "collection0",
21+
"database": "database0",
22+
"collectionName": "coll0"
23+
}
24+
}
25+
],
26+
"initialData": [
27+
{
28+
"collectionName": "coll0",
29+
"databaseName": "database0Name",
30+
"documents": []
31+
}
32+
],
33+
"tests": [
34+
{
35+
"description": "malformed operation fails if ignoreResultAndError is true",
36+
"operations": [
37+
{
38+
"name": "insertOne",
39+
"object": "collection0",
40+
"arguments": {
41+
"foo": "bar"
42+
},
43+
"ignoreResultAndError": true
44+
}
45+
]
46+
}
47+
]
48+
}

tests/UnifiedSpecTests/valid-fail/ignoreResultAndError.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,6 @@
5454
"ignoreResultAndError": false
5555
}
5656
]
57-
},
58-
{
59-
"description": "malformed operation fails if ignoreResultAndError is true",
60-
"operations": [
61-
{
62-
"name": "insertOne",
63-
"object": "collection0",
64-
"arguments": {
65-
"foo": "bar"
66-
},
67-
"ignoreResultAndError": true
68-
}
69-
]
7057
}
7158
]
7259
}

0 commit comments

Comments
 (0)