File tree Expand file tree Collapse file tree 5 files changed +42
-37
lines changed
unified-test-format/tests/valid-pass Expand file tree Collapse file tree 5 files changed +42
-37
lines changed Original file line number Diff line number Diff line change @@ -26,17 +26,18 @@ tests:
26
26
command:
27
27
ping: 1
28
28
command_name: ping
29
- - description: "current op is not bypassed"
29
+ - description: "kill op is not bypassed"
30
30
clientOptions:
31
31
autoEncryptOpts:
32
32
kmsProviders:
33
33
aws: {} # Credentials filled in from environment.
34
34
operations:
35
35
- name: runCommand
36
36
object: database
37
- command_name: currentOp
37
+ command_name: killOp
38
38
arguments:
39
39
command:
40
- currentOp: 1
40
+ killOp: 1
41
+ op: 1234
41
42
result:
42
- errorContains: "command not supported for auto encryption: currentOp "
43
+ errorContains: "command not supported for auto encryption: killOp "
Original file line number Diff line number Diff line change 78
78
]
79
79
},
80
80
{
81
- "description" : " current op is not bypassed" ,
81
+ "description" : " kill op is not bypassed" ,
82
82
"clientOptions" : {
83
83
"autoEncryptOpts" : {
84
84
"kmsProviders" : {
90
90
{
91
91
"name" : " runCommand" ,
92
92
"object" : " database" ,
93
- "command_name" : " currentOp " ,
93
+ "command_name" : " killOp " ,
94
94
"arguments" : {
95
95
"command" : {
96
- "currentOp" : 1
96
+ "killOp" : 1 ,
97
+ "op" : 1234
97
98
}
98
99
},
99
100
"result" : {
100
- "errorContains" : " command not supported for auto encryption: currentOp "
101
+ "errorContains" : " command not supported for auto encryption: killOp "
101
102
}
102
103
}
103
104
]
Original file line number Diff line number Diff line change @@ -26,17 +26,18 @@ tests:
26
26
command :
27
27
ping : 1
28
28
command_name : ping
29
- - description : " current op is not bypassed"
29
+ - description : " kill op is not bypassed"
30
30
clientOptions :
31
31
autoEncryptOpts :
32
32
kmsProviders :
33
33
aws : {} # Credentials filled in from environment.
34
34
operations :
35
35
- name : runCommand
36
36
object : database
37
- command_name : currentOp
37
+ command_name : killOp
38
38
arguments :
39
39
command :
40
- currentOp : 1
40
+ killOp : 1
41
+ op : 1234
41
42
result :
42
- errorContains : " command not supported for auto encryption: currentOp "
43
+ errorContains : " command not supported for auto encryption: killOp "
Original file line number Diff line number Diff line change 49
49
"description" : " collection is created with the correct options" ,
50
50
"operations" : [
51
51
{
52
- "name " : " runCommand " ,
53
- "object " : " database0 " ,
52
+ "object " : " collection0 " ,
53
+ "name " : " aggregate " ,
54
54
"arguments" : {
55
- "commandName" : " collStats" ,
56
- "command" : {
57
- "collStats" : " coll0" ,
58
- "scale" : 1
59
- }
55
+ "pipeline" : [
56
+ {
57
+ "$collStats" : {
58
+ "storageStats" : {}
59
+ }
60
+ },
61
+ {
62
+ "$project" : {
63
+ "capped" : " $storageStats.capped" ,
64
+ "maxSize" : " $storageStats.maxSize"
65
+ }
66
+ }
67
+ ]
60
68
},
61
- "expectResult" : {
62
- "capped" : true ,
63
- "maxSize" : 4096
64
- }
69
+ "expectResult" : [
70
+ {
71
+ "capped" : true ,
72
+ "maxSize" : 4096
73
+ }
74
+ ]
65
75
}
66
76
]
67
77
}
Original file line number Diff line number Diff line change 1
1
description : collectionData-createOptions
2
-
3
2
schemaVersion : " 1.9"
4
-
5
3
runOnRequirements :
6
4
- minServerVersion : " 3.6"
7
5
# Capped collections cannot be created on serverless instances.
8
6
serverless : forbid
9
-
10
7
createEntities :
11
8
- client :
12
9
id : &client0 client0
@@ -18,7 +15,6 @@ createEntities:
18
15
id : &collection0 collection0
19
16
database : *database0
20
17
collectionName : &collection0Name coll0
21
-
22
18
initialData :
23
19
- collectionName : *collection0Name
24
20
databaseName : *database0Name
@@ -28,18 +24,14 @@ initialData:
28
24
size : &cappedSize 4096
29
25
documents :
30
26
- { _id: 1, x: 11 }
31
-
32
27
tests :
33
28
- description : collection is created with the correct options
34
29
operations :
35
- # Execute a collStats command to ensure the collection was created with the correct options.
36
- - name : runCommand
37
- object : *database0
30
+ - object : *collection0
31
+ name : aggregate
38
32
arguments :
39
- commandName : collStats
40
- command :
41
- collStats : *collection0Name
42
- scale : 1
33
+ pipeline :
34
+ - $collStats : { storageStats: {} }
35
+ - $project : { capped: '$storageStats.capped', maxSize: '$storageStats.maxSize'}
43
36
expectResult :
44
- capped : true
45
- maxSize : *cappedSize
37
+ - { capped: true, maxSize: *cappedSize }
You can’t perform that action at this time.
0 commit comments