mongo 2.18.0.beta1 → 2.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/mongo/bulk_write.rb +8 -2
- data/lib/mongo/client.rb +19 -5
- data/lib/mongo/client_encryption.rb +86 -4
- data/lib/mongo/cluster.rb +6 -4
- data/lib/mongo/collection/view/aggregation.rb +3 -0
- data/lib/mongo/collection/view/change_stream.rb +9 -0
- data/lib/mongo/collection/view/iterable.rb +1 -0
- data/lib/mongo/collection/view/readable.rb +11 -3
- data/lib/mongo/collection.rb +9 -1
- data/lib/mongo/config.rb +11 -0
- data/lib/mongo/crypt/auto_encrypter.rb +49 -21
- data/lib/mongo/crypt/binding.rb +73 -48
- data/lib/mongo/crypt/data_key_context.rb +6 -1
- data/lib/mongo/crypt/encryption_io.rb +66 -0
- data/lib/mongo/crypt/explicit_encrypter.rb +116 -5
- data/lib/mongo/crypt/explicit_encryption_context.rb +3 -8
- data/lib/mongo/crypt/handle.rb +26 -8
- data/lib/mongo/crypt/kms/aws.rb +11 -3
- data/lib/mongo/crypt/kms/azure.rb +14 -6
- data/lib/mongo/crypt/kms/gcp.rb +12 -5
- data/lib/mongo/crypt/kms/kmip.rb +15 -9
- data/lib/mongo/crypt/kms/local.rb +9 -1
- data/lib/mongo/crypt/kms/master_key_document.rb +1 -1
- data/lib/mongo/crypt/rewrap_many_data_key_context.rb +46 -0
- data/lib/mongo/crypt/rewrap_many_data_key_result.rb +37 -0
- data/lib/mongo/crypt/status.rb +8 -2
- data/lib/mongo/crypt.rb +2 -0
- data/lib/mongo/database.rb +10 -27
- data/lib/mongo/error/missing_file_chunk.rb +8 -2
- data/lib/mongo/grid/stream/read.rb +6 -0
- data/lib/mongo/index/view.rb +1 -0
- data/lib/mongo/operation/create/op_msg.rb +1 -13
- data/lib/mongo/operation/distinct/op_msg.rb +4 -1
- data/lib/mongo/protocol/msg.rb +0 -16
- data/lib/mongo/server/connection_pool.rb +5 -4
- data/lib/mongo/server/monitor/connection.rb +10 -4
- data/lib/mongo/server/monitor.rb +4 -0
- data/lib/mongo/server/push_monitor.rb +4 -0
- data/lib/mongo/version.rb +1 -1
- data/lib/mongo.rb +2 -0
- data/spec/README.md +14 -0
- data/spec/integration/change_stream_spec.rb +1 -1
- data/spec/integration/client_construction_spec.rb +73 -7
- data/spec/integration/client_side_encryption/auto_encryption_command_monitoring_spec.rb +165 -164
- data/spec/integration/client_side_encryption/decryption_events_prose_spec.rb +158 -0
- data/spec/integration/client_side_encryption/explicit_queryable_encryption_spec.rb +5 -5
- data/spec/integration/client_side_encryption/kms_tls_options_spec.rb +50 -8
- data/spec/integration/client_side_encryption/unique_index_on_key_alt_names_prose_spec.rb +85 -0
- data/spec/integration/ocsp_verifier_spec.rb +1 -1
- data/spec/integration/reconnect_spec.rb +2 -0
- data/spec/integration/sdam_events_spec.rb +40 -0
- data/spec/integration/srv_monitoring_spec.rb +1 -0
- data/spec/integration/srv_spec.rb +1 -0
- data/spec/lite_spec_helper.rb +5 -4
- data/spec/mongo/bulk_write_spec.rb +13 -0
- data/spec/mongo/client_construction_spec.rb +45 -2
- data/spec/mongo/client_encryption_spec.rb +0 -12
- data/spec/mongo/client_spec.rb +1 -1
- data/spec/mongo/collection/view/aggregation_spec.rb +119 -0
- data/spec/mongo/collection/view/readable_spec.rb +630 -5
- data/spec/mongo/collection_spec.rb +32 -0
- data/spec/mongo/crypt/auto_encrypter_spec.rb +110 -0
- data/spec/mongo/crypt/binding/context_spec.rb +3 -35
- data/spec/mongo/crypt/data_key_context_spec.rb +1 -1
- data/spec/mongo/crypt/explicit_encryption_context_spec.rb +8 -3
- data/spec/mongo/crypt/handle_spec.rb +39 -3
- data/spec/mongo/crypt/kms/credentials_spec.rb +0 -47
- data/spec/mongo/index/view_spec.rb +56 -0
- data/spec/mongo/operation/create/op_msg_spec.rb +0 -42
- data/spec/mongo/server/connection_pool_spec.rb +26 -4
- data/spec/mongo/socket/ssl_spec.rb +3 -3
- data/spec/runners/crud/requirement.rb +6 -1
- data/spec/runners/crud/test.rb +1 -1
- data/spec/runners/transactions/spec.rb +2 -2
- data/spec/runners/transactions/test.rb +4 -20
- data/spec/runners/transactions.rb +2 -2
- data/spec/runners/unified/assertions.rb +32 -2
- data/spec/runners/unified/change_stream_operations.rb +3 -0
- data/spec/runners/unified/client_side_encryption_operations.rb +83 -0
- data/spec/runners/unified/crud_operations.rb +17 -2
- data/spec/runners/unified/ddl_operations.rb +27 -2
- data/spec/runners/unified/grid_fs_operations.rb +21 -0
- data/spec/runners/unified/test.rb +59 -1
- data/spec/shared/lib/mrss/docker_runner.rb +2 -0
- data/spec/shared/lib/mrss/eg_config_utils.rb +51 -0
- data/spec/shared/lib/mrss/lite_constraints.rb +10 -2
- data/spec/shared/shlib/set_env.sh +3 -0
- data/spec/solo/clean_exit_spec.rb +5 -0
- data/spec/spec_tests/client_side_encryption_spec.rb +1 -1
- data/spec/spec_tests/client_side_encryption_unified_spec.rb +16 -0
- data/spec/spec_tests/data/change_streams_unified/change-streams-showExpandedEvents.yml +298 -0
- data/spec/spec_tests/data/client_side_encryption/create-and-createIndexes.yml +58 -0
- data/spec/spec_tests/data/client_side_encryption/fle2-Delete.yml +1 -1
- data/spec/spec_tests/data/client_side_encryption/fle2-EncryptedFields-vs-jsonSchema.yml +1 -1
- data/spec/spec_tests/data/client_side_encryption/fle2-FindOneAndUpdate.yml +2 -2
- data/spec/spec_tests/data/client_side_encryption/fle2-InsertFind-Indexed.yml +1 -1
- data/spec/spec_tests/data/client_side_encryption/fle2-Update.yml +2 -2
- data/spec/spec_tests/data/client_side_encryption/unified/addKeyAltName.yml +194 -0
- data/spec/spec_tests/data/client_side_encryption/unified/createDataKey-kms_providers-invalid.yml +67 -0
- data/spec/spec_tests/data/client_side_encryption/unified/createDataKey.yml +309 -0
- data/spec/spec_tests/data/client_side_encryption/unified/deleteKey.yml +159 -0
- data/spec/spec_tests/data/client_side_encryption/unified/getKey.yml +105 -0
- data/spec/spec_tests/data/client_side_encryption/unified/getKeyByAltName.yml +104 -0
- data/spec/spec_tests/data/client_side_encryption/unified/getKeys.yml +122 -0
- data/spec/spec_tests/data/client_side_encryption/unified/removeKeyAltName.yml +157 -0
- data/spec/spec_tests/data/client_side_encryption/unified/rewrapManyDataKey-decrypt_failure.yml +69 -0
- data/spec/spec_tests/data/client_side_encryption/unified/rewrapManyDataKey-encrypt_failure.yml +122 -0
- data/spec/spec_tests/data/client_side_encryption/unified/rewrapManyDataKey.yml +432 -0
- data/spec/spec_tests/data/client_side_encryption/validatorAndPartialFieldExpression.yml +166 -0
- data/spec/spec_tests/data/command_monitoring_unified/bulkWrite.yml +68 -0
- data/spec/spec_tests/data/command_monitoring_unified/command.yml +50 -0
- data/spec/spec_tests/data/command_monitoring_unified/deleteMany.yml +79 -0
- data/spec/spec_tests/data/command_monitoring_unified/deleteOne.yml +79 -0
- data/spec/spec_tests/data/command_monitoring_unified/find.yml +254 -0
- data/spec/spec_tests/data/command_monitoring_unified/insertMany.yml +79 -0
- data/spec/spec_tests/data/command_monitoring_unified/insertOne.yml +77 -0
- data/spec/spec_tests/data/command_monitoring_unified/unacknowledgedBulkWrite.yml +55 -0
- data/spec/spec_tests/data/command_monitoring_unified/updateMany.yml +87 -0
- data/spec/spec_tests/data/command_monitoring_unified/updateOne.yml +118 -0
- data/spec/spec_tests/data/crud_unified/distinct-comment.yml +98 -0
- data/spec/spec_tests/data/gridfs_unified/delete.yml +198 -0
- data/spec/spec_tests/data/gridfs_unified/download.yml +241 -0
- data/spec/spec_tests/data/gridfs_unified/downloadByName.yml +159 -0
- data/spec/spec_tests/data/gridfs_unified/upload-disableMD5.yml +92 -0
- data/spec/spec_tests/data/gridfs_unified/upload.yml +288 -0
- data/spec/spec_tests/gridfs_unified_spec.rb +13 -0
- data/spec/stress/connection_pool_timing_spec.rb +2 -2
- data/spec/support/background_thread_registry.rb +3 -13
- data/spec/support/certificates/atlas-ocsp-ca.crt +40 -47
- data/spec/support/certificates/atlas-ocsp.crt +101 -106
- data/spec/support/crypt.rb +57 -13
- data/spec/support/macros.rb +10 -0
- data/spec/support/spec_config.rb +4 -0
- data.tar.gz.sig +0 -0
- metadata +1271 -1219
- metadata.gz.sig +0 -0
- data/spec/spec_tests/command_monitoring_spec.rb +0 -71
- data/spec/spec_tests/data/command_monitoring/bulkWrite.yml +0 -49
- data/spec/spec_tests/data/command_monitoring/command.yml +0 -61
- data/spec/spec_tests/data/command_monitoring/deleteMany.yml +0 -55
- data/spec/spec_tests/data/command_monitoring/deleteOne.yml +0 -55
- data/spec/spec_tests/data/command_monitoring/find.yml +0 -266
- data/spec/spec_tests/data/command_monitoring/insertMany.yml +0 -75
- data/spec/spec_tests/data/command_monitoring/insertOne.yml +0 -51
- data/spec/spec_tests/data/command_monitoring/unacknowledgedBulkWrite.yml +0 -34
- data/spec/spec_tests/data/command_monitoring/updateMany.yml +0 -65
- data/spec/spec_tests/data/command_monitoring/updateOne.yml +0 -90
@@ -0,0 +1,288 @@
|
|
1
|
+
description: "gridfs-upload"
|
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: &database0Name gridfs-tests
|
12
|
+
- bucket:
|
13
|
+
id: &bucket0 bucket0
|
14
|
+
database: *database0
|
15
|
+
- collection:
|
16
|
+
id: &bucket0_files_collection bucket0_files_collection
|
17
|
+
database: *database0
|
18
|
+
collectionName: &bucket0_files_collectionName fs.files
|
19
|
+
- collection:
|
20
|
+
id: &bucket0_chunks_collection bucket0_chunks_collection
|
21
|
+
database: *database0
|
22
|
+
collectionName: &bucket0_chunks_collectionName fs.chunks
|
23
|
+
|
24
|
+
initialData:
|
25
|
+
- collectionName: *bucket0_files_collectionName
|
26
|
+
databaseName: *database0Name
|
27
|
+
documents: []
|
28
|
+
- collectionName: *bucket0_chunks_collectionName
|
29
|
+
databaseName: *database0Name
|
30
|
+
documents: []
|
31
|
+
|
32
|
+
# Note: Uploaded files and chunks include ObjectIds, which we cannot match with
|
33
|
+
# "outcome" since it does not allow operators. Instead, these tests will use
|
34
|
+
# find operations to assert the contents of uploaded files and chunks.
|
35
|
+
tests:
|
36
|
+
- description: "upload when length is 0"
|
37
|
+
operations:
|
38
|
+
- name: upload
|
39
|
+
object: *bucket0
|
40
|
+
arguments:
|
41
|
+
filename: "filename"
|
42
|
+
source: { $$hexBytes: "" }
|
43
|
+
chunkSizeBytes: 4
|
44
|
+
expectResult: { $$type: objectId }
|
45
|
+
saveResultAsEntity: &uploadedObjectId uploadedObjectId
|
46
|
+
- name: find
|
47
|
+
object: *bucket0_files_collection
|
48
|
+
arguments:
|
49
|
+
filter: {}
|
50
|
+
expectResult:
|
51
|
+
- _id: { $$matchesEntity: *uploadedObjectId }
|
52
|
+
length: 0
|
53
|
+
chunkSize: 4
|
54
|
+
uploadDate: { $$type: date }
|
55
|
+
# The md5 field is deprecated so some drivers do not calculate it when uploading files.
|
56
|
+
md5: { $$unsetOrMatches: "d41d8cd98f00b204e9800998ecf8427e" }
|
57
|
+
filename: filename
|
58
|
+
- name: find
|
59
|
+
object: *bucket0_chunks_collection
|
60
|
+
arguments:
|
61
|
+
filter: {}
|
62
|
+
expectResult: []
|
63
|
+
- description: "upload when length is 1"
|
64
|
+
operations:
|
65
|
+
- name: upload
|
66
|
+
object: *bucket0
|
67
|
+
arguments:
|
68
|
+
filename: "filename"
|
69
|
+
source: { $$hexBytes: "11" }
|
70
|
+
chunkSizeBytes: 4
|
71
|
+
expectResult: { $$type: objectId }
|
72
|
+
saveResultAsEntity: *uploadedObjectId
|
73
|
+
- name: find
|
74
|
+
object: *bucket0_files_collection
|
75
|
+
arguments:
|
76
|
+
filter: {}
|
77
|
+
expectResult:
|
78
|
+
- _id: { $$matchesEntity: *uploadedObjectId }
|
79
|
+
length: 1
|
80
|
+
chunkSize: 4
|
81
|
+
uploadDate: { $$type: date }
|
82
|
+
md5: { $$unsetOrMatches: "47ed733b8d10be225eceba344d533586" }
|
83
|
+
filename: filename
|
84
|
+
- name: find
|
85
|
+
object: *bucket0_chunks_collection
|
86
|
+
arguments:
|
87
|
+
filter: {}
|
88
|
+
expectResult:
|
89
|
+
- _id: { $$type: objectId }
|
90
|
+
files_id: { $$matchesEntity: *uploadedObjectId }
|
91
|
+
n: 0
|
92
|
+
data: { $binary: { base64: "EQ==", subType: "00" } } # hex 11
|
93
|
+
- description: "upload when length is 3"
|
94
|
+
operations:
|
95
|
+
- name: upload
|
96
|
+
object: *bucket0
|
97
|
+
arguments:
|
98
|
+
filename: "filename"
|
99
|
+
source: { $$hexBytes: "112233" }
|
100
|
+
chunkSizeBytes: 4
|
101
|
+
expectResult: { $$type: objectId }
|
102
|
+
saveResultAsEntity: *uploadedObjectId
|
103
|
+
- name: find
|
104
|
+
object: *bucket0_files_collection
|
105
|
+
arguments:
|
106
|
+
filter: {}
|
107
|
+
expectResult:
|
108
|
+
- _id: { $$matchesEntity: *uploadedObjectId }
|
109
|
+
length: 3
|
110
|
+
chunkSize: 4
|
111
|
+
uploadDate: { $$type: date }
|
112
|
+
md5: { $$unsetOrMatches: "bafae3a174ab91fc70db7a6aa50f4f52" }
|
113
|
+
filename: filename
|
114
|
+
- name: find
|
115
|
+
object: *bucket0_chunks_collection
|
116
|
+
arguments:
|
117
|
+
filter: {}
|
118
|
+
expectResult:
|
119
|
+
- _id: { $$type: objectId }
|
120
|
+
files_id: { $$matchesEntity: *uploadedObjectId }
|
121
|
+
n: 0
|
122
|
+
data: { $binary: { base64: "ESIz", subType: "00" } } # hex 112233
|
123
|
+
- description: "upload when length is 4"
|
124
|
+
operations:
|
125
|
+
- name: upload
|
126
|
+
object: *bucket0
|
127
|
+
arguments:
|
128
|
+
filename: "filename"
|
129
|
+
source: { $$hexBytes: "11223344" }
|
130
|
+
chunkSizeBytes: 4
|
131
|
+
expectResult: { $$type: objectId }
|
132
|
+
saveResultAsEntity: *uploadedObjectId
|
133
|
+
- name: find
|
134
|
+
object: *bucket0_files_collection
|
135
|
+
arguments:
|
136
|
+
filter: {}
|
137
|
+
expectResult:
|
138
|
+
- _id: { $$matchesEntity: *uploadedObjectId }
|
139
|
+
length: 4
|
140
|
+
chunkSize: 4
|
141
|
+
uploadDate: { $$type: date }
|
142
|
+
md5: { $$unsetOrMatches: "7e7c77cff5705d1f7574a25ef6662117" }
|
143
|
+
filename: filename
|
144
|
+
- name: find
|
145
|
+
object: *bucket0_chunks_collection
|
146
|
+
arguments:
|
147
|
+
filter: {}
|
148
|
+
expectResult:
|
149
|
+
- _id: { $$type: objectId }
|
150
|
+
files_id: { $$matchesEntity: *uploadedObjectId }
|
151
|
+
n: 0
|
152
|
+
data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex 11223344
|
153
|
+
- description: "upload when length is 5"
|
154
|
+
operations:
|
155
|
+
- name: upload
|
156
|
+
object: *bucket0
|
157
|
+
arguments:
|
158
|
+
filename: filename
|
159
|
+
source: { $$hexBytes: "1122334455" }
|
160
|
+
chunkSizeBytes: 4
|
161
|
+
expectResult: { $$type: objectId }
|
162
|
+
saveResultAsEntity: *uploadedObjectId
|
163
|
+
- name: find
|
164
|
+
object: *bucket0_files_collection
|
165
|
+
arguments:
|
166
|
+
filter: {}
|
167
|
+
expectResult:
|
168
|
+
- _id: { $$matchesEntity: *uploadedObjectId }
|
169
|
+
length: 5
|
170
|
+
chunkSize: 4
|
171
|
+
uploadDate: { $$type: date }
|
172
|
+
md5: { $$unsetOrMatches: "283d4fea5dded59cf837d3047328f5af" }
|
173
|
+
filename: filename
|
174
|
+
- name: find
|
175
|
+
object: *bucket0_chunks_collection
|
176
|
+
arguments:
|
177
|
+
filter: {}
|
178
|
+
# Sort to ensure chunks are returned in a deterministic order
|
179
|
+
sort: { n: 1 }
|
180
|
+
expectResult:
|
181
|
+
- _id: { $$type: objectId }
|
182
|
+
files_id: { $$matchesEntity: *uploadedObjectId }
|
183
|
+
n: 0
|
184
|
+
data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex 11223344
|
185
|
+
- _id: { $$type: objectId }
|
186
|
+
files_id: { $$matchesEntity: *uploadedObjectId }
|
187
|
+
n: 1
|
188
|
+
data: { $binary: { base64: "VQ==", subType: "00" } } # hex 55
|
189
|
+
- description: "upload when length is 8"
|
190
|
+
operations:
|
191
|
+
- name: upload
|
192
|
+
object: *bucket0
|
193
|
+
arguments:
|
194
|
+
filename: filename
|
195
|
+
source: { $$hexBytes: "1122334455667788" }
|
196
|
+
chunkSizeBytes: 4
|
197
|
+
expectResult: { $$type: objectId }
|
198
|
+
saveResultAsEntity: *uploadedObjectId
|
199
|
+
- name: find
|
200
|
+
object: *bucket0_files_collection
|
201
|
+
arguments:
|
202
|
+
filter: {}
|
203
|
+
expectResult:
|
204
|
+
- _id: { $$matchesEntity: *uploadedObjectId }
|
205
|
+
length: 8
|
206
|
+
chunkSize: 4
|
207
|
+
uploadDate: { $$type: date }
|
208
|
+
md5: { $$unsetOrMatches: "dd254cdc958e53abaa67da9f797125f5" }
|
209
|
+
filename: filename
|
210
|
+
- name: find
|
211
|
+
object: *bucket0_chunks_collection
|
212
|
+
arguments:
|
213
|
+
filter: {}
|
214
|
+
# Sort to ensure chunks are returned in a deterministic order
|
215
|
+
sort: { n: 1 }
|
216
|
+
expectResult:
|
217
|
+
- _id: { $$type: objectId }
|
218
|
+
files_id: { $$matchesEntity: *uploadedObjectId }
|
219
|
+
n: 0
|
220
|
+
data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex 11223344
|
221
|
+
- _id: { $$type: objectId }
|
222
|
+
files_id: { $$matchesEntity: *uploadedObjectId }
|
223
|
+
n: 1
|
224
|
+
data: { $binary: { base64: "VWZ3iA==", subType: "00" } } # hex 55667788
|
225
|
+
- description: "upload when contentType is provided"
|
226
|
+
operations:
|
227
|
+
- name: upload
|
228
|
+
object: *bucket0
|
229
|
+
arguments:
|
230
|
+
filename: "filename"
|
231
|
+
source: { $$hexBytes: "11" }
|
232
|
+
chunkSizeBytes: 4
|
233
|
+
contentType: "image/jpeg"
|
234
|
+
expectResult: { $$type: objectId }
|
235
|
+
saveResultAsEntity: *uploadedObjectId
|
236
|
+
- name: find
|
237
|
+
object: *bucket0_files_collection
|
238
|
+
arguments:
|
239
|
+
filter: {}
|
240
|
+
expectResult:
|
241
|
+
- _id: { $$matchesEntity: *uploadedObjectId }
|
242
|
+
length: 1
|
243
|
+
chunkSize: 4
|
244
|
+
uploadDate: { $$type: date }
|
245
|
+
md5: { $$unsetOrMatches: "47ed733b8d10be225eceba344d533586" }
|
246
|
+
filename: filename
|
247
|
+
contentType: "image/jpeg"
|
248
|
+
- name: find
|
249
|
+
object: *bucket0_chunks_collection
|
250
|
+
arguments:
|
251
|
+
filter: {}
|
252
|
+
expectResult:
|
253
|
+
- _id: { $$type: objectId }
|
254
|
+
files_id: { $$matchesEntity: *uploadedObjectId }
|
255
|
+
n: 0
|
256
|
+
data: { $binary: { base64: "EQ==", subType: "00" } } # hex 11
|
257
|
+
- description: "upload when metadata is provided"
|
258
|
+
operations:
|
259
|
+
- name: upload
|
260
|
+
object: *bucket0
|
261
|
+
arguments:
|
262
|
+
filename: "filename"
|
263
|
+
source: { $$hexBytes: "11" }
|
264
|
+
chunkSizeBytes: 4
|
265
|
+
metadata: { x: 1 }
|
266
|
+
expectResult: { $$type: objectId }
|
267
|
+
saveResultAsEntity: *uploadedObjectId
|
268
|
+
- name: find
|
269
|
+
object: *bucket0_files_collection
|
270
|
+
arguments:
|
271
|
+
filter: {}
|
272
|
+
expectResult:
|
273
|
+
- _id: { $$matchesEntity: *uploadedObjectId }
|
274
|
+
length: 1
|
275
|
+
chunkSize: 4
|
276
|
+
uploadDate: { $$type: date }
|
277
|
+
md5: { $$unsetOrMatches: "47ed733b8d10be225eceba344d533586" }
|
278
|
+
filename: filename
|
279
|
+
metadata: { x: 1 }
|
280
|
+
- name: find
|
281
|
+
object: *bucket0_chunks_collection
|
282
|
+
arguments:
|
283
|
+
filter: {}
|
284
|
+
expectResult:
|
285
|
+
- _id: { $$type: objectId }
|
286
|
+
files_id: { $$matchesEntity: *uploadedObjectId }
|
287
|
+
n: 0
|
288
|
+
data: { $binary: { base64: "EQ==", subType: "00" } } # hex 11
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
require 'spec_helper'
|
5
|
+
|
6
|
+
require 'runners/unified'
|
7
|
+
|
8
|
+
base = "#{CURRENT_PATH}/spec_tests/data/gridfs_unified"
|
9
|
+
GRIDFS_UNIFIED_TESTS = Dir.glob("#{base}/**/*.yml").sort
|
10
|
+
|
11
|
+
describe 'GridFS unified spec tests' do
|
12
|
+
define_unified_spec_tests(base, GRIDFS_UNIFIED_TESTS)
|
13
|
+
end
|
@@ -25,7 +25,7 @@ describe 'Connection pool timing test' do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
let(:client) do
|
28
|
-
authorized_client.with(options.merge(
|
28
|
+
authorized_client.with(options.merge(monitoring_io: true))
|
29
29
|
end
|
30
30
|
|
31
31
|
let!(:collection) do
|
@@ -169,7 +169,7 @@ describe 'Connection pool timing test' do
|
|
169
169
|
# On JRuby, sometimes the following error is produced indicating
|
170
170
|
# possible data corruption or an interpreter bug:
|
171
171
|
# RSpec::Expectations::ExpectationNotMetError: expected no Exception, got #<Mongo::Error::OperationFailure: Invalid ns [ruby-driver.] (73) (on localhost:27018, modern retry, attempt 1) (on localhost:27018, modern retry, attempt 1)>
|
172
|
-
retry_test (BSON::Environment.jruby? ? 3 : 1)
|
172
|
+
retry_test tries: (BSON::Environment.jruby? ? 3 : 1)
|
173
173
|
it 'does not error' do
|
174
174
|
threads
|
175
175
|
start = Time.now
|
@@ -30,7 +30,8 @@ class BackgroundThreadRegistry
|
|
30
30
|
@records << OpenStruct.new(
|
31
31
|
thread: thread,
|
32
32
|
object: object,
|
33
|
-
|
33
|
+
# When rake spec:prepare is run, the current_example method is not defined
|
34
|
+
example: RSpec.respond_to?(:current_example) ? RSpec.current_example : nil,
|
34
35
|
)
|
35
36
|
end
|
36
37
|
end
|
@@ -46,7 +47,7 @@ class BackgroundThreadRegistry
|
|
46
47
|
msg << "\n with options: #{record.object.options}"
|
47
48
|
end
|
48
49
|
if record.example
|
49
|
-
msg << "\n in #{record.example.id} #{record.example.full_description}"
|
50
|
+
msg << "\n in #{record.example.id}: #{record.example.full_description}"
|
50
51
|
else
|
51
52
|
msg << "\n not in an example"
|
52
53
|
end
|
@@ -57,14 +58,3 @@ class BackgroundThreadRegistry
|
|
57
58
|
end
|
58
59
|
end
|
59
60
|
end
|
60
|
-
|
61
|
-
RSpec.configure do |config|
|
62
|
-
config.around do |example|
|
63
|
-
$current_example = example
|
64
|
-
begin
|
65
|
-
example.run
|
66
|
-
ensure
|
67
|
-
$current_example = nil
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
@@ -2,16 +2,16 @@ Certificate:
|
|
2
2
|
Data:
|
3
3
|
Version: 3 (0x2)
|
4
4
|
Serial Number:
|
5
|
-
|
5
|
+
06:d8:d9:04:d5:58:43:46:f6:8a:2f:a7:54:22:7e:c4
|
6
6
|
Signature Algorithm: sha256WithRSAEncryption
|
7
7
|
Issuer: C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
|
8
8
|
Validity
|
9
|
-
Not Before:
|
10
|
-
Not After :
|
9
|
+
Not Before: Apr 14 00:00:00 2021 GMT
|
10
|
+
Not After : Apr 13 23:59:59 2031 GMT
|
11
11
|
Subject: C = US, O = DigiCert Inc, CN = DigiCert TLS RSA SHA256 2020 CA1
|
12
12
|
Subject Public Key Info:
|
13
13
|
Public Key Algorithm: rsaEncryption
|
14
|
-
|
14
|
+
Public-Key: (2048 bit)
|
15
15
|
Modulus:
|
16
16
|
00:c1:4b:b3:65:47:70:bc:dd:4f:58:db:ec:9c:ed:
|
17
17
|
c3:66:e5:1f:31:13:54:ad:4a:66:46:1f:2c:0a:ec:
|
@@ -33,57 +33,51 @@ Certificate:
|
|
33
33
|
99:f5
|
34
34
|
Exponent: 65537 (0x10001)
|
35
35
|
X509v3 extensions:
|
36
|
+
X509v3 Basic Constraints: critical
|
37
|
+
CA:TRUE, pathlen:0
|
36
38
|
X509v3 Subject Key Identifier:
|
37
39
|
B7:6B:A2:EA:A8:AA:84:8C:79:EA:B4:DA:0F:98:B2:C5:95:76:B9:F4
|
38
40
|
X509v3 Authority Key Identifier:
|
39
|
-
|
40
|
-
|
41
|
+
03:DE:50:35:56:D1:4C:BB:66:F0:A3:E2:1B:1B:C3:97:B2:3D:D1:55
|
41
42
|
X509v3 Key Usage: critical
|
42
43
|
Digital Signature, Certificate Sign, CRL Sign
|
43
44
|
X509v3 Extended Key Usage:
|
44
45
|
TLS Web Server Authentication, TLS Web Client Authentication
|
45
|
-
X509v3 Basic Constraints: critical
|
46
|
-
CA:TRUE, pathlen:0
|
47
46
|
Authority Information Access:
|
48
47
|
OCSP - URI:http://ocsp.digicert.com
|
49
48
|
CA Issuers - URI:http://cacerts.digicert.com/DigiCertGlobalRootCA.crt
|
50
|
-
|
51
49
|
X509v3 CRL Distribution Points:
|
52
|
-
|
53
50
|
Full Name:
|
54
51
|
URI:http://crl3.digicert.com/DigiCertGlobalRootCA.crl
|
55
|
-
|
56
|
-
Full Name:
|
57
|
-
URI:http://crl4.digicert.com/DigiCertGlobalRootCA.crl
|
58
|
-
|
59
52
|
X509v3 Certificate Policies:
|
53
|
+
Policy: 2.16.840.1.114412.2.1
|
60
54
|
Policy: 2.23.140.1.1
|
61
55
|
Policy: 2.23.140.1.2.1
|
62
56
|
Policy: 2.23.140.1.2.2
|
63
57
|
Policy: 2.23.140.1.2.3
|
64
|
-
|
65
58
|
Signature Algorithm: sha256WithRSAEncryption
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
59
|
+
Signature Value:
|
60
|
+
80:32:ce:5e:0b:dd:6e:5a:0d:0a:af:e1:d6:84:cb:c0:8e:fa:
|
61
|
+
85:70:ed:da:5d:b3:0c:f7:2b:75:40:fe:85:0a:fa:f3:31:78:
|
62
|
+
b7:70:4b:1a:89:58:ba:80:bd:f3:6b:1d:e9:7e:cf:0b:ba:58:
|
63
|
+
9c:59:d4:90:d3:fd:6c:fd:d0:98:6d:b7:71:82:5b:cf:6d:0b:
|
64
|
+
5a:09:d0:7b:de:c4:43:d8:2a:a4:de:9e:41:26:5f:bb:8f:99:
|
65
|
+
cb:dd:ae:e1:a8:6f:9f:87:fe:74:b7:1f:1b:20:ab:b1:4f:c6:
|
66
|
+
f5:67:5d:5d:9b:3c:e9:ff:69:f7:61:6c:d6:d9:f3:fd:36:c6:
|
67
|
+
ab:03:88:76:d2:4b:2e:75:86:e3:fc:d8:55:7d:26:c2:11:77:
|
68
|
+
df:3e:02:b6:7c:f3:ab:7b:7a:86:36:6f:b8:f7:d8:93:71:cf:
|
69
|
+
86:df:73:30:fa:7b:ab:ed:2a:59:c8:42:84:3b:11:17:1a:52:
|
70
|
+
f3:c9:0e:14:7d:a2:5b:72:67:ba:71:ed:57:47:66:c5:b8:02:
|
71
|
+
4a:65:34:5e:8b:d0:2a:3c:20:9c:51:99:4c:e7:52:9e:f7:6b:
|
72
|
+
11:2b:0d:92:7e:1d:e8:8a:eb:36:16:43:87:ea:2a:63:bf:75:
|
73
|
+
3f:eb:de:c4:03:bb:0a:3c:f7:30:ef:eb:af:4c:fc:8b:36:10:
|
74
|
+
73:3e:f3:a4
|
81
75
|
|
82
76
|
-----BEGIN CERTIFICATE-----
|
83
|
-
|
77
|
+
MIIEvjCCA6agAwIBAgIQBtjZBNVYQ0b2ii+nVCJ+xDANBgkqhkiG9w0BAQsFADBh
|
84
78
|
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
|
85
79
|
d3cuZGl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