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
@@ -1,34 +0,0 @@
|
|
1
|
-
data:
|
2
|
-
- { _id: 1, x: 11 }
|
3
|
-
|
4
|
-
collection_name: &collection_name "test"
|
5
|
-
database_name: &database_name "ruby-driver"
|
6
|
-
|
7
|
-
tests:
|
8
|
-
-
|
9
|
-
description: "A successful unordered bulk write with an unacknowledged write concern"
|
10
|
-
comment: "On a 2.4 server, no GLE is sent and requires a client-side manufactured reply"
|
11
|
-
operation:
|
12
|
-
name: "bulkWrite"
|
13
|
-
arguments:
|
14
|
-
requests:
|
15
|
-
- name: "insertOne"
|
16
|
-
arguments:
|
17
|
-
document: { _id: "unorderedBulkWriteInsertW0", x: 44 }
|
18
|
-
options: { ordered: false }
|
19
|
-
writeConcern: { w: 0 }
|
20
|
-
expectations:
|
21
|
-
-
|
22
|
-
command_started_event:
|
23
|
-
command:
|
24
|
-
insert: *collection_name
|
25
|
-
documents:
|
26
|
-
- { _id: "unorderedBulkWriteInsertW0", x: 44 }
|
27
|
-
ordered: false
|
28
|
-
writeConcern: { w: 0 }
|
29
|
-
command_name: "insert"
|
30
|
-
database_name: *database_name
|
31
|
-
-
|
32
|
-
command_succeeded_event:
|
33
|
-
reply: { ok: 1.0 }
|
34
|
-
command_name: "insert"
|
@@ -1,65 +0,0 @@
|
|
1
|
-
data:
|
2
|
-
- { _id: 1, x: 11 }
|
3
|
-
- { _id: 2, x: 22 }
|
4
|
-
- { _id: 3, x: 33 }
|
5
|
-
|
6
|
-
collection_name: &collection_name "test"
|
7
|
-
database_name: &database_name "ruby-driver"
|
8
|
-
|
9
|
-
tests:
|
10
|
-
-
|
11
|
-
description: "A successful update many"
|
12
|
-
operation:
|
13
|
-
name: "updateMany"
|
14
|
-
arguments:
|
15
|
-
filter:
|
16
|
-
_id: { $gt: 1 }
|
17
|
-
update:
|
18
|
-
$inc: { x: 1 }
|
19
|
-
expectations:
|
20
|
-
-
|
21
|
-
command_started_event:
|
22
|
-
command:
|
23
|
-
update: *collection_name
|
24
|
-
ordered: true
|
25
|
-
updates:
|
26
|
-
-
|
27
|
-
q: { _id: { $gt: 1 }}
|
28
|
-
u: { $inc: { x: 1 }}
|
29
|
-
multi: true
|
30
|
-
command_name: "update"
|
31
|
-
database_name: *database_name
|
32
|
-
-
|
33
|
-
command_succeeded_event:
|
34
|
-
reply: { ok: 1.0, n: 2 }
|
35
|
-
command_name: "update"
|
36
|
-
-
|
37
|
-
description: "A successful update many command with write errors"
|
38
|
-
operation:
|
39
|
-
name: "updateMany"
|
40
|
-
arguments:
|
41
|
-
filter:
|
42
|
-
_id: { $gt: 1 }
|
43
|
-
update:
|
44
|
-
$nothing: { x: 1 }
|
45
|
-
expectations:
|
46
|
-
-
|
47
|
-
command_started_event:
|
48
|
-
command:
|
49
|
-
update: *collection_name
|
50
|
-
ordered: true
|
51
|
-
updates:
|
52
|
-
-
|
53
|
-
q: { _id: { $gt: 1 }}
|
54
|
-
u: { $nothing: { x: 1 }}
|
55
|
-
multi: true
|
56
|
-
command_name: "update"
|
57
|
-
database_name: *database_name
|
58
|
-
-
|
59
|
-
command_succeeded_event:
|
60
|
-
reply:
|
61
|
-
ok: 1.0
|
62
|
-
n: 0
|
63
|
-
writeErrors:
|
64
|
-
- { index: 0, code: 42, errmsg: "" }
|
65
|
-
command_name: "update"
|
@@ -1,90 +0,0 @@
|
|
1
|
-
data:
|
2
|
-
- { _id: 1, x: 11 }
|
3
|
-
- { _id: 2, x: 22 }
|
4
|
-
- { _id: 3, x: 33 }
|
5
|
-
|
6
|
-
collection_name: &collection_name "test"
|
7
|
-
database_name: &database_name "ruby-driver"
|
8
|
-
|
9
|
-
tests:
|
10
|
-
-
|
11
|
-
description: "A successful update one"
|
12
|
-
operation:
|
13
|
-
name: "updateOne"
|
14
|
-
arguments:
|
15
|
-
filter:
|
16
|
-
_id: { $gt: 1 }
|
17
|
-
update:
|
18
|
-
$inc: { x: 1 }
|
19
|
-
expectations:
|
20
|
-
-
|
21
|
-
command_started_event:
|
22
|
-
command:
|
23
|
-
update: *collection_name
|
24
|
-
ordered: true
|
25
|
-
updates:
|
26
|
-
-
|
27
|
-
q: { _id: { $gt: 1 }}
|
28
|
-
u: { $inc: { x: 1 }}
|
29
|
-
command_name: "update"
|
30
|
-
database_name: *database_name
|
31
|
-
-
|
32
|
-
command_succeeded_event:
|
33
|
-
reply: { ok: 1.0, n: 1 }
|
34
|
-
command_name: "update"
|
35
|
-
-
|
36
|
-
description: "A successful update one with upsert when the upserted id is not an object id"
|
37
|
-
operation:
|
38
|
-
name: "updateOne"
|
39
|
-
arguments:
|
40
|
-
filter:
|
41
|
-
_id: 4
|
42
|
-
update:
|
43
|
-
$inc: { x: 1 }
|
44
|
-
upsert: true
|
45
|
-
expectations:
|
46
|
-
-
|
47
|
-
command_started_event:
|
48
|
-
command:
|
49
|
-
update: *collection_name
|
50
|
-
ordered: true
|
51
|
-
updates:
|
52
|
-
-
|
53
|
-
q: { _id: 4 }
|
54
|
-
u: { $inc: { x: 1 } }
|
55
|
-
upsert: true
|
56
|
-
command_name: "update"
|
57
|
-
database_name: *database_name
|
58
|
-
-
|
59
|
-
command_succeeded_event:
|
60
|
-
reply: { ok: 1.0, n: 1, upserted: [{ index: 0, _id: 4 }] }
|
61
|
-
command_name: "update"
|
62
|
-
-
|
63
|
-
description: "A successful update one command with write errors"
|
64
|
-
operation:
|
65
|
-
name: "updateOne"
|
66
|
-
arguments:
|
67
|
-
filter:
|
68
|
-
_id: { $gt: 1 }
|
69
|
-
update:
|
70
|
-
$nothing: { x: 1 }
|
71
|
-
expectations:
|
72
|
-
-
|
73
|
-
command_started_event:
|
74
|
-
command:
|
75
|
-
update: *collection_name
|
76
|
-
ordered: true
|
77
|
-
updates:
|
78
|
-
-
|
79
|
-
q: { _id: { $gt: 1 }}
|
80
|
-
u: { $nothing: { x: 1 }}
|
81
|
-
command_name: "update"
|
82
|
-
database_name: *database_name
|
83
|
-
-
|
84
|
-
command_succeeded_event:
|
85
|
-
reply:
|
86
|
-
ok: 1.0
|
87
|
-
n: 0
|
88
|
-
writeErrors:
|
89
|
-
- { index: 0, code: 42, errmsg: "" }
|
90
|
-
command_name: "update"
|