-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
17 changed files
with
476 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
test/spec/unified-test-format/valid-fail/entity-findCursor-malformed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
test/spec/unified-test-format/valid-fail/entity-findCursor-malformed.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This test is split out into a separate file to accommodate drivers that validate operation structure while decoding | ||
# from JSON/YML. Such drivers fail to decode any files containing invalid operations. Combining this test in a file | ||
# with other entity-findCursor valid-fail tests, which test failures that occur during test execution, would prevent | ||
# such drivers from decoding the file and running any of the tests. | ||
description: entity-findCursor-malformed | ||
|
||
schemaVersion: '1.3' | ||
|
||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
- database: | ||
id: &database0 database0 | ||
client: *client0 | ||
databaseName: &database0Name database0Name | ||
- collection: | ||
id: &collection0 collection0 | ||
database: *database0 | ||
collectionName: &collection0Name coll0 | ||
|
||
initialData: | ||
- databaseName: *database0Name | ||
collectionName: *collection0Name | ||
documents: [] | ||
|
||
tests: | ||
- description: createFindCursor fails if filter is not specified | ||
operations: | ||
- name: createFindCursor | ||
object: *collection0 | ||
saveResultAsEntity: &cursor0 cursor0 |
52 changes: 52 additions & 0 deletions
52
test/spec/unified-test-format/valid-fail/entity-findCursor.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"description": "entity-findCursor", | ||
"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": "iterateUntilDocumentOrError fails if it references a nonexistent entity", | ||
"operations": [ | ||
{ | ||
"name": "iterateUntilDocumentOrError", | ||
"object": "cursor0" | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "close fails if it references a nonexistent entity", | ||
"operations": [ | ||
{ | ||
"name": "close", | ||
"object": "cursor0" | ||
} | ||
] | ||
} | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
test/spec/unified-test-format/valid-fail/entity-findCursor.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
description: entity-findCursor | ||
|
||
schemaVersion: '1.3' | ||
|
||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
- database: | ||
id: &database0 database0 | ||
client: *client0 | ||
databaseName: &database0Name database0Name | ||
- collection: | ||
id: &collection0 collection0 | ||
database: *database0 | ||
collectionName: &collection0Name coll0 | ||
|
||
initialData: | ||
- databaseName: *database0Name | ||
collectionName: *collection0Name | ||
documents: [] | ||
|
||
tests: | ||
- description: iterateUntilDocumentOrError fails if it references a nonexistent entity | ||
operations: | ||
- name: iterateUntilDocumentOrError | ||
object: cursor0 | ||
|
||
- description: close fails if it references a nonexistent entity | ||
operations: | ||
- name: close | ||
object: cursor0 |
48 changes: 48 additions & 0 deletions
48
test/spec/unified-test-format/valid-fail/ignoreResultAndError-malformed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} | ||
] | ||
} |
34 changes: 34 additions & 0 deletions
34
test/spec/unified-test-format/valid-fail/ignoreResultAndError-malformed.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This test is split out into a separate file to accommodate drivers that validate operation structure while decoding | ||
# from JSON/YML. Such drivers fail to decode any files containing invalid operations. Combining this test in a file | ||
# with other ignoreResultAndError valid-fail tests, which test failures that occur during test execution, would prevent | ||
# such drivers from decoding the file and running any of the tests. | ||
description: ignoreResultAndError-malformed | ||
|
||
schemaVersion: '1.3' | ||
|
||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
useMultipleMongoses: true | ||
- database: | ||
id: &database0 database0 | ||
client: *client0 | ||
databaseName: &database0Name database0Name | ||
- collection: | ||
id: &collection0 collection0 | ||
database: *database0 | ||
collectionName: &collection0Name coll0 | ||
|
||
initialData: | ||
- collectionName: *collection0Name | ||
databaseName: *database0Name | ||
documents: [] | ||
|
||
tests: | ||
- description: malformed operation fails if ignoreResultAndError is true | ||
operations: | ||
- name: insertOne | ||
object: *collection0 | ||
arguments: | ||
foo: bar | ||
ignoreResultAndError: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
test/spec/unified-test-format/valid-fail/operation-unsupported.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"description": "operation-unsupported", | ||
"schemaVersion": "1.0", | ||
"createEntities": [ | ||
{ | ||
"client": { | ||
"id": "client0" | ||
} | ||
} | ||
], | ||
"tests": [ | ||
{ | ||
"description": "Unsupported operation", | ||
"operations": [ | ||
{ | ||
"name": "unsupportedOperation", | ||
"object": "client0" | ||
} | ||
] | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
test/spec/unified-test-format/valid-fail/operation-unsupported.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
description: "operation-unsupported" | ||
|
||
schemaVersion: "1.0" | ||
|
||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
|
||
tests: | ||
- description: "Unsupported operation" | ||
operations: | ||
- name: unsupportedOperation | ||
object: *client0 |
Oops, something went wrong.