Skip to content

Commit 8a39d22

Browse files
authored
SPEC-1781 Expect success for operations without expectError and expectResult (#904)
As a valid-fail test, this will ensure test runners expect operations to succeed by default even if they have no result assertions.
1 parent ca36dc8 commit 8a39d22

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"description": "operation-failure",
3+
"schemaVersion": "1.0",
4+
"createEntities": [
5+
{
6+
"client": {
7+
"id": "client0"
8+
}
9+
},
10+
{
11+
"database": {
12+
"id": "database0",
13+
"client": "client0",
14+
"databaseName": "operation-failure"
15+
}
16+
},
17+
{
18+
"collection": {
19+
"id": "collection0",
20+
"database": "database0",
21+
"collectionName": "coll0"
22+
}
23+
}
24+
],
25+
"tests": [
26+
{
27+
"description": "Unsupported command",
28+
"operations": [
29+
{
30+
"name": "runCommand",
31+
"object": "database0",
32+
"arguments": {
33+
"commandName": "unsupportedCommand",
34+
"command": {
35+
"unsupportedCommand": 1
36+
}
37+
}
38+
}
39+
]
40+
},
41+
{
42+
"description": "Unsupported query operator",
43+
"operations": [
44+
{
45+
"name": "find",
46+
"object": "collection0",
47+
"arguments": {
48+
"filter": {
49+
"$unsupportedQueryOperator": 1
50+
}
51+
}
52+
}
53+
]
54+
}
55+
]
56+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
description: "operation-failure"
2+
3+
schemaVersion: "1.0"
4+
5+
createEntities:
6+
- client:
7+
id: &client0 client0
8+
- database:
9+
id: &database0 database0
10+
client: *client0
11+
databaseName: operation-failure
12+
- collection:
13+
id: &collection0 collection0
14+
database: *database0
15+
collectionName: coll0
16+
17+
tests:
18+
- description: "Unsupported command"
19+
operations:
20+
- name: runCommand
21+
object: *database0
22+
arguments:
23+
commandName: unsupportedCommand
24+
command: { unsupportedCommand: 1 }
25+
26+
- description: "Unsupported query operator"
27+
operations:
28+
- name: find
29+
object: *collection0
30+
arguments:
31+
filter: { $unsupportedQueryOperator: 1 }

0 commit comments

Comments
 (0)