Skip to content

Commit

Permalink
PHPLIB-708: Sync unified test runner valid-fail tests (#858)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola committed Aug 30, 2021
1 parent d4d7ac4 commit 57cd7e0
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 24 deletions.
44 changes: 44 additions & 0 deletions tests/UnifiedSpecTests/valid-fail/entity-findCursor-malformed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"description": "entity-findCursor-malformed",
"schemaVersion": "1.3",
"createEntities": [
{
"client": {
"id": "client0"
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "database0Name"
}
},
{
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "coll0"
}
}
],
"initialData": [
{
"databaseName": "database0Name",
"collectionName": "coll0",
"documents": []
}
],
"tests": [
{
"description": "createFindCursor fails if filter is not specified",
"operations": [
{
"name": "createFindCursor",
"object": "collection0",
"saveResultAsEntity": "cursor0"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "entity-find-cursor",
"description": "entity-findCursor",
"schemaVersion": "1.3",
"createEntities": [
{
Expand Down Expand Up @@ -30,16 +30,6 @@
}
],
"tests": [
{
"description": "createFindCursor fails if filter is not specified",
"operations": [
{
"name": "createFindCursor",
"object": "collection0",
"saveResultAsEntity": "cursor0"
}
]
},
{
"description": "iterateUntilDocumentOrError fails if it references a nonexistent entity",
"operations": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"description": "ignoreResultAndError-malformed",
"schemaVersion": "1.3",
"createEntities": [
{
"client": {
"id": "client0",
"useMultipleMongoses": true
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "database0Name"
}
},
{
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "coll0"
}
}
],
"initialData": [
{
"collectionName": "coll0",
"databaseName": "database0Name",
"documents": []
}
],
"tests": [
{
"description": "malformed operation fails if ignoreResultAndError is true",
"operations": [
{
"name": "insertOne",
"object": "collection0",
"arguments": {
"foo": "bar"
},
"ignoreResultAndError": true
}
]
}
]
}
13 changes: 0 additions & 13 deletions tests/UnifiedSpecTests/valid-fail/ignoreResultAndError.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,6 @@
"ignoreResultAndError": false
}
]
},
{
"description": "malformed operation fails if ignoreResultAndError is true",
"operations": [
{
"name": "insertOne",
"object": "collection0",
"arguments": {
"foo": "bar"
},
"ignoreResultAndError": true
}
]
}
]
}

0 comments on commit 57cd7e0

Please sign in to comment.