mongo 2.15.1 → 2.16.0.alpha1
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/README.md +1 -1
- data/lib/mongo/bulk_write.rb +2 -2
- data/lib/mongo/client.rb +45 -5
- data/lib/mongo/cluster/periodic_executor.rb +4 -3
- data/lib/mongo/cluster/reapers/cursor_reaper.rb +76 -43
- data/lib/mongo/cluster/sdam_flow.rb +9 -3
- data/lib/mongo/cluster/topology/base.rb +13 -9
- data/lib/mongo/cluster/topology/load_balanced.rb +102 -0
- data/lib/mongo/cluster/topology.rb +28 -8
- data/lib/mongo/cluster.rb +136 -51
- data/lib/mongo/collection/view/aggregation.rb +5 -10
- data/lib/mongo/collection/view/builder/aggregation.rb +6 -5
- data/lib/mongo/collection/view/builder/map_reduce.rb +12 -49
- data/lib/mongo/collection/view/builder.rb +0 -4
- data/lib/mongo/collection/view/iterable.rb +42 -18
- data/lib/mongo/collection/view/map_reduce.rb +39 -15
- data/lib/mongo/collection/view/readable.rb +60 -51
- data/lib/mongo/collection/view/writable.rb +178 -175
- data/lib/mongo/collection/view.rb +15 -21
- data/lib/mongo/collection.rb +13 -13
- data/lib/mongo/cursor/kill_spec.rb +38 -0
- data/lib/mongo/cursor.rb +62 -31
- data/lib/mongo/database/view.rb +1 -1
- data/lib/mongo/error/bad_load_balancer_target.rb +26 -0
- data/lib/mongo/error/missing_service_id.rb +26 -0
- data/lib/mongo/error/no_service_connection_available.rb +49 -0
- data/lib/mongo/error/notable.rb +7 -0
- data/lib/mongo/error.rb +3 -0
- data/lib/mongo/grid/fs_bucket.rb +21 -2
- data/lib/mongo/id.rb +7 -5
- data/lib/mongo/index/view.rb +22 -41
- data/lib/mongo/monitoring/event/cmap/pool_cleared.rb +7 -4
- data/lib/mongo/monitoring/event/command_failed.rb +1 -1
- data/lib/mongo/monitoring/event/command_started.rb +2 -0
- data/lib/mongo/monitoring/publishable.rb +2 -2
- data/lib/mongo/operation/aggregate/command.rb +8 -0
- data/lib/mongo/operation/context.rb +19 -1
- data/lib/mongo/operation/count/command.rb +6 -0
- data/lib/mongo/operation/count/op_msg.rb +6 -0
- data/lib/mongo/operation/create/command.rb +7 -1
- data/lib/mongo/operation/create/op_msg.rb +7 -0
- data/lib/mongo/operation/create_index/command.rb +17 -1
- data/lib/mongo/operation/create_index/op_msg.rb +17 -4
- data/lib/mongo/operation/delete/command.rb +6 -3
- data/lib/mongo/operation/delete/legacy.rb +9 -2
- data/lib/mongo/operation/delete/op_msg.rb +8 -1
- data/lib/mongo/operation/distinct/command.rb +6 -0
- data/lib/mongo/operation/distinct/op_msg.rb +7 -0
- data/lib/mongo/operation/explain/command.rb +13 -1
- data/lib/mongo/operation/explain/legacy.rb +12 -5
- data/lib/mongo/operation/explain/op_msg.rb +9 -1
- data/lib/mongo/operation/find/builder/command.rb +110 -0
- data/lib/mongo/{collection/view → operation/find}/builder/flags.rb +10 -14
- data/lib/mongo/operation/find/builder/legacy.rb +123 -0
- data/lib/mongo/{collection/view → operation/find}/builder/modifiers.rb +31 -25
- data/lib/mongo/{cursor → operation/find}/builder.rb +4 -4
- data/lib/mongo/operation/find/command.rb +9 -0
- data/lib/mongo/operation/find/legacy.rb +10 -1
- data/lib/mongo/operation/find/op_msg.rb +12 -0
- data/lib/mongo/operation/find.rb +1 -0
- data/lib/mongo/operation/get_more/command.rb +1 -0
- data/lib/mongo/operation/get_more/command_builder.rb +38 -0
- data/lib/mongo/operation/get_more/op_msg.rb +1 -0
- data/lib/mongo/operation/get_more.rb +1 -0
- data/lib/mongo/operation/kill_cursors/command.rb +8 -0
- data/lib/mongo/operation/kill_cursors/command_builder.rb +35 -0
- data/lib/mongo/operation/kill_cursors/legacy.rb +2 -1
- data/lib/mongo/operation/kill_cursors/op_msg.rb +10 -0
- data/lib/mongo/operation/kill_cursors.rb +1 -0
- data/lib/mongo/operation/map_reduce/command.rb +8 -0
- data/lib/mongo/operation/map_reduce/op_msg.rb +1 -1
- data/lib/mongo/operation/shared/executable.rb +15 -1
- data/lib/mongo/operation/shared/polymorphic_operation.rb +1 -1
- data/lib/mongo/operation/shared/read_preference_supported.rb +3 -1
- data/lib/mongo/operation/shared/response_handling.rb +1 -0
- data/lib/mongo/operation/shared/sessions_supported.rb +12 -12
- data/lib/mongo/operation/shared/specifiable.rb +11 -29
- data/lib/mongo/operation/shared/validatable.rb +87 -0
- data/lib/mongo/operation/shared/write.rb +1 -1
- data/lib/mongo/operation/update/command.rb +6 -3
- data/lib/mongo/operation/update/legacy.rb +19 -11
- data/lib/mongo/operation/update/op_msg.rb +7 -4
- data/lib/mongo/operation/write_command/command.rb +51 -0
- data/lib/mongo/operation/write_command/op_msg.rb +43 -0
- data/lib/mongo/operation/write_command.rb +32 -0
- data/lib/mongo/operation.rb +10 -0
- data/lib/mongo/protocol/query.rb +35 -18
- data/lib/mongo/server/connection.rb +25 -3
- data/lib/mongo/server/connection_base.rb +12 -1
- data/lib/mongo/server/connection_common.rb +38 -1
- data/lib/mongo/server/connection_pool/generation_manager.rb +71 -0
- data/lib/mongo/server/connection_pool.rb +100 -27
- data/lib/mongo/server/description/features.rb +17 -16
- data/lib/mongo/server/description/load_balancer.rb +33 -0
- data/lib/mongo/server/description.rb +85 -6
- data/lib/mongo/server/monitor/connection.rb +5 -6
- data/lib/mongo/server/monitor.rb +2 -1
- data/lib/mongo/server/pending_connection.rb +47 -31
- data/lib/mongo/server.rb +73 -26
- data/lib/mongo/server_selector/base.rb +5 -1
- data/lib/mongo/session/session_pool.rb +11 -0
- data/lib/mongo/session.rb +21 -1
- data/lib/mongo/socket/ocsp_verifier.rb +6 -37
- data/lib/mongo/uri/options_mapper.rb +1 -0
- data/lib/mongo/uri/srv_protocol.rb +6 -8
- data/lib/mongo/uri.rb +18 -0
- data/lib/mongo/utils.rb +0 -7
- data/lib/mongo/version.rb +1 -1
- data/mongo.gemspec +1 -1
- data/spec/integration/auth_spec.rb +31 -1
- data/spec/integration/awaited_ismaster_spec.rb +1 -1
- data/spec/integration/bulk_write_spec.rb +1 -1
- data/spec/integration/change_stream_spec.rb +3 -3
- data/spec/integration/client_construction_spec.rb +54 -0
- data/spec/integration/client_side_encryption/auto_encryption_bulk_writes_spec.rb +1 -1
- data/spec/integration/client_side_encryption/auto_encryption_command_monitoring_spec.rb +1 -1
- data/spec/integration/client_side_encryption/bson_size_limit_spec.rb +1 -1
- data/spec/integration/client_side_encryption/data_key_spec.rb +1 -1
- data/spec/integration/client_spec.rb +2 -0
- data/spec/integration/command_monitoring_spec.rb +1 -1
- data/spec/integration/command_spec.rb +1 -1
- data/spec/integration/connection_spec.rb +52 -35
- data/spec/integration/crud_spec.rb +174 -1
- data/spec/integration/cursor_pinning_spec.rb +121 -0
- data/spec/integration/cursor_reaping_spec.rb +8 -4
- data/spec/integration/fork_reconnect_spec.rb +1 -5
- data/spec/integration/get_more_spec.rb +1 -1
- data/spec/integration/heartbeat_events_spec.rb +1 -1
- data/spec/integration/map_reduce_spec.rb +77 -0
- data/spec/integration/query_cache_spec.rb +2 -2
- data/spec/integration/query_cache_transactions_spec.rb +1 -1
- data/spec/integration/read_concern_spec.rb +1 -1
- data/spec/integration/read_preference_spec.rb +1 -1
- data/spec/integration/reconnect_spec.rb +30 -12
- data/spec/integration/retryable_errors_spec.rb +1 -1
- data/spec/integration/retryable_writes/retryable_writes_36_and_older_spec.rb +1 -1
- data/spec/integration/retryable_writes/retryable_writes_40_and_newer_spec.rb +1 -1
- data/spec/integration/sdam_error_handling_spec.rb +5 -3
- data/spec/integration/sdam_events_spec.rb +35 -19
- data/spec/integration/sdam_prose_spec.rb +1 -1
- data/spec/integration/server_monitor_spec.rb +1 -0
- data/spec/integration/server_selector_spec.rb +22 -5
- data/spec/integration/server_spec.rb +2 -0
- data/spec/integration/srv_monitoring_spec.rb +1 -1
- data/spec/integration/step_down_spec.rb +1 -1
- data/spec/integration/transaction_pinning_spec.rb +120 -0
- data/spec/integration/versioned_api_examples_spec.rb +45 -0
- data/spec/integration/x509_auth_spec.rb +1 -1
- data/spec/lite_spec_helper.rb +1 -2
- data/spec/mongo/address/unix_spec.rb +1 -0
- data/spec/mongo/auth/cr_spec.rb +2 -3
- data/spec/mongo/auth/ldap_spec.rb +2 -3
- data/spec/mongo/auth/scram_spec.rb +2 -3
- data/spec/mongo/auth/user/view_spec.rb +1 -1
- data/spec/mongo/auth/x509_spec.rb +2 -3
- data/spec/mongo/bulk_write_spec.rb +3 -3
- data/spec/mongo/client_construction_spec.rb +259 -28
- data/spec/mongo/client_spec.rb +6 -4
- data/spec/mongo/cluster/cursor_reaper_spec.rb +36 -21
- data/spec/mongo/cluster/periodic_executor_spec.rb +3 -1
- data/spec/mongo/cluster_spec.rb +44 -3
- data/spec/mongo/collection/view/aggregation_spec.rb +1 -1
- data/spec/mongo/collection/view/builder/find_command_spec.rb +4 -0
- data/spec/mongo/collection/view/builder/op_query_spec.rb +4 -0
- data/spec/mongo/collection/view/map_reduce_spec.rb +1 -1
- data/spec/mongo/collection_crud_spec.rb +7 -2
- data/spec/mongo/collection_ddl_spec.rb +1 -1
- data/spec/mongo/collection_spec.rb +1 -1
- data/spec/mongo/cursor/builder/get_more_command_spec.rb +4 -0
- data/spec/mongo/cursor/builder/op_get_more_spec.rb +4 -0
- data/spec/mongo/cursor_spec.rb +15 -5
- data/spec/mongo/database_spec.rb +15 -15
- data/spec/mongo/error/operation_failure_heavy_spec.rb +1 -1
- data/spec/mongo/grid/fs_bucket_spec.rb +18 -12
- data/spec/mongo/grid/stream/write_spec.rb +3 -9
- data/spec/mongo/grid/stream_spec.rb +1 -1
- data/spec/mongo/index/view_spec.rb +2 -2
- data/spec/mongo/operation/delete/op_msg_spec.rb +1 -1
- data/spec/mongo/{collection/view → operation/find}/builder/flags_spec.rb +2 -2
- data/spec/mongo/{collection/view → operation/find}/builder/modifiers_spec.rb +2 -2
- data/spec/mongo/operation/find/legacy_spec.rb +1 -0
- data/spec/mongo/operation/insert/bulk_spec.rb +1 -1
- data/spec/mongo/operation/insert/op_msg_spec.rb +1 -1
- data/spec/mongo/operation/kill_cursors_spec.rb +4 -1
- data/spec/mongo/operation/read_preference_legacy_spec.rb +4 -0
- data/spec/mongo/operation/read_preference_op_msg_spec.rb +2 -0
- data/spec/mongo/operation/update/bulk_spec.rb +1 -1
- data/spec/mongo/operation/update/op_msg_spec.rb +1 -1
- data/spec/mongo/query_cache_spec.rb +6 -2
- data/spec/mongo/server/connection_common_spec.rb +62 -11
- data/spec/mongo/server/connection_pool_spec.rb +73 -7
- data/spec/mongo/server/connection_spec.rb +138 -43
- data/spec/mongo/server/description_spec.rb +1 -1
- data/spec/mongo/server/monitor_spec.rb +4 -3
- data/spec/mongo/session/session_pool_spec.rb +42 -10
- data/spec/mongo/session_transaction_spec.rb +15 -30
- data/spec/mongo/socket/unix_spec.rb +1 -0
- data/spec/mongo/uri_option_parsing_spec.rb +38 -5
- data/spec/runners/change_streams/test.rb +1 -1
- data/spec/runners/cmap.rb +1 -1
- data/spec/runners/connection_string.rb +7 -3
- data/spec/runners/crud/operation.rb +5 -3
- data/spec/runners/crud/requirement.rb +1 -0
- data/spec/runners/crud.rb +1 -1
- data/spec/runners/sdam.rb +2 -1
- data/spec/runners/transactions/test.rb +2 -2
- data/spec/runners/unified/assertions.rb +2 -3
- data/spec/runners/unified/event_subscriber.rb +2 -2
- data/spec/runners/unified/test.rb +3 -0
- data/spec/runners/unified.rb +1 -1
- data/spec/shared/lib/mrss/constraints.rb +11 -5
- data/spec/shared/lib/mrss/event_subscriber.rb +200 -0
- data/spec/shared/lib/mrss/server_version_registry.rb +17 -12
- data/spec/shared/share/Dockerfile.erb +2 -1
- data/spec/shared/shlib/server.sh +70 -20
- data/spec/spec_tests/change_streams_spec.rb +1 -1
- data/spec/spec_tests/cmap_spec.rb +4 -1
- data/spec/spec_tests/command_monitoring_spec.rb +2 -2
- data/spec/spec_tests/data/command_monitoring/find.yml +9 -9
- data/spec/spec_tests/data/crud/read/aggregate-collation.yml +2 -1
- data/spec/spec_tests/data/crud/read/aggregate-out.yml +1 -0
- data/spec/spec_tests/data/crud/read/count-collation.yml +2 -1
- data/spec/spec_tests/data/crud/read/distinct-collation.yml +2 -1
- data/spec/spec_tests/data/crud/read/find-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/bulkWrite-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/deleteMany-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/deleteOne-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/findOneAndDelete-collation.yml +3 -2
- data/spec/spec_tests/data/crud/write/findOneAndReplace-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/findOneAndUpdate-collation.yml +3 -2
- data/spec/spec_tests/data/crud/write/replaceOne-collation.yml +3 -2
- data/spec/spec_tests/data/crud/write/updateMany-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/updateOne-collation.yml +2 -1
- data/spec/spec_tests/data/load_balancers/event-monitoring.yml +99 -0
- data/spec/spec_tests/data/load_balancers/lb-connection-establishment.yml +36 -0
- data/spec/spec_tests/data/load_balancers/non-lb-connection-establishment.yml +56 -0
- data/spec/spec_tests/data/load_balancers/server-selection.yml +50 -0
- data/spec/spec_tests/data/retryable_reads/changeStreams-client.watch-serverErrors.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/changeStreams-client.watch.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.coll.watch-serverErrors.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.coll.watch.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.watch-serverErrors.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.watch.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/mapReduce.yml +3 -1
- data/spec/spec_tests/data/sdam/load-balanced/discover_load_balancer.yml +25 -0
- data/spec/spec_tests/data/sdam_integration/find-network-error.yml +2 -0
- data/spec/spec_tests/data/sdam_integration/find-shutdown-error.yml +2 -0
- data/spec/spec_tests/data/sdam_integration/hello-command-error.yml +3 -1
- data/spec/spec_tests/data/sdam_integration/hello-network-error.yml +3 -1
- data/spec/spec_tests/data/sdam_integration/hello-timeout.yml +2 -0
- data/spec/spec_tests/data/sdam_integration/insert-network-error.yml +2 -0
- data/spec/spec_tests/data/sdam_integration/insert-shutdown-error.yml +2 -0
- data/spec/spec_tests/data/sdam_monitoring/load_balancer.yml +65 -0
- data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-directConnection.yml +13 -0
- data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-replicaSet-errors.yml +6 -0
- data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-multiple-hosts.yml +5 -0
- data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-txt.yml +10 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/direct-connection-false.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/direct-connection-true.yml +0 -0
- data/spec/spec_tests/data/seed_list_discovery/replica-set/encoded-userinfo-and-db.yml +15 -0
- data/spec/spec_tests/data/seed_list_discovery/replica-set/loadBalanced-false-txt.yml +10 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/longer-parent-in-return.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/misformatted-option.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/no-results.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/not-enough-parts.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-result-default-port.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-txt-record-multiple-strings.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-txt-record.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch1.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch2.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch3.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch4.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch5.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/returned-parent-too-short.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/returned-parent-wrong.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-results-default-port.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-results-nonstandard-port.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-txt-records.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-not-allowed-option.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-overridden-ssl-option.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-overridden-uri-option.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-unallowed-option.yml +0 -0
- data/spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-admin-database.yml +13 -0
- data/spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-auth.yml +12 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/uri-with-port.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/uri-with-two-hosts.yml +0 -0
- data/spec/spec_tests/data/transactions/retryable-abort-errorLabels.yml +2 -0
- data/spec/spec_tests/data/transactions/retryable-abort.yml +2 -0
- data/spec/spec_tests/data/transactions/retryable-commit-errorLabels.yml +2 -0
- data/spec/spec_tests/data/transactions/retryable-commit.yml +2 -0
- data/spec/spec_tests/data/transactions/retryable-writes.yml +2 -0
- data/spec/spec_tests/data/uri_options/connection-options.yml +60 -0
- data/spec/spec_tests/load_balancers_spec.rb +15 -0
- data/spec/spec_tests/retryable_reads_spec.rb +2 -2
- data/spec/spec_tests/retryable_writes_spec.rb +1 -1
- data/spec/spec_tests/sdam_integration_spec.rb +1 -1
- data/spec/spec_tests/sdam_monitoring_spec.rb +10 -5
- data/spec/spec_tests/sdam_spec.rb +1 -1
- data/spec/spec_tests/seed_list_discovery_spec.rb +118 -0
- data/spec/spec_tests/uri_options_spec.rb +4 -4
- data/spec/stress/fork_reconnect_stress_spec.rb +1 -5
- data/spec/support/certificates/atlas-ocsp-ca.crt +82 -90
- data/spec/support/certificates/atlas-ocsp.crt +127 -122
- data/spec/support/common_shortcuts.rb +2 -3
- data/spec/support/matchers.rb +13 -0
- data/spec/support/shared/auth_context.rb +16 -0
- data/spec/support/shared/session.rb +2 -2
- data/spec/support/spec_config.rb +9 -10
- data/spec/support/using_hash.rb +31 -0
- data/spec/support/utils.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +120 -76
- metadata.gz.sig +0 -0
- data/lib/mongo/collection/view/builder/find_command.rb +0 -173
- data/lib/mongo/collection/view/builder/op_query.rb +0 -94
- data/lib/mongo/cursor/builder/get_more_command.rb +0 -80
- data/lib/mongo/cursor/builder/kill_cursors_command.rb +0 -111
- data/lib/mongo/cursor/builder/op_get_more.rb +0 -64
- data/lib/mongo/cursor/builder/op_kill_cursors.rb +0 -106
- data/lib/mongo/server/context.rb +0 -72
- data/spec/mongo/cursor/builder/op_kill_cursors_spec.rb +0 -66
- data/spec/runners/unified/using_hash.rb +0 -34
- data/spec/spec_tests/dns_seedlist_discovery_spec.rb +0 -79
- data/spec/support/event_subscriber.rb +0 -221
@@ -2,151 +2,156 @@ Certificate:
|
|
2
2
|
Data:
|
3
3
|
Version: 3 (0x2)
|
4
4
|
Serial Number:
|
5
|
-
|
5
|
+
08:dc:93:55:36:6d:c5:92:20:d0:a3:4c:a1:19:ab:2d
|
6
6
|
Signature Algorithm: sha256WithRSAEncryption
|
7
|
-
Issuer: C = US, O =
|
7
|
+
Issuer: C = US, O = DigiCert Inc, CN = DigiCert TLS RSA SHA256 2020 CA1
|
8
8
|
Validity
|
9
|
-
Not Before:
|
10
|
-
Not After :
|
11
|
-
Subject: CN = *.
|
9
|
+
Not Before: Apr 27 00:00:00 2021 GMT
|
10
|
+
Not After : May 25 23:59:59 2022 GMT
|
11
|
+
Subject: C = US, ST = New York, L = New York, O = "MongoDB, Inc.", CN = *.mongodb-dev.net
|
12
12
|
Subject Public Key Info:
|
13
13
|
Public Key Algorithm: rsaEncryption
|
14
|
-
RSA Public-Key: (
|
14
|
+
RSA Public-Key: (2048 bit)
|
15
15
|
Modulus:
|
16
|
-
00:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
cc:30:48:2d:01:4b:e9:d4:c6:ca:2d:00:74:05:b4:
|
35
|
-
8c:3a:6b:3f:db:7a:33:96:17:28:87:56:0d:a1:1c:
|
36
|
-
44:60:9a:ae:34:2a:61:ee:e2:42:b3:8b:89:ff:5d:
|
37
|
-
fa:19:5d:b7:1f:db:0d:44:92:80:83:df:e0:11:88:
|
38
|
-
7c:9a:96:f8:7f:5b:cb:6a:ea:44:e6:2c:33:0a:ef:
|
39
|
-
32:d7:52:00:b6:30:86:43:d7:60:8b:33:0a:6c:43:
|
40
|
-
9c:e9:7b:73:8b:fa:97:9f:23:d4:9a:90:a5:92:25:
|
41
|
-
6d:03:b6:0e:33:30:5f:ac:04:0b:4c:cf:ab:82:04:
|
42
|
-
56:21:f0:7a:19:55:b5:63:03:35:f9:a0:84:26:73:
|
43
|
-
cd:4e:9a:c3:34:bc:9e:9c:61:28:6f:fb:1b:b8:a2:
|
44
|
-
8e:4a:f8:b5:f2:03:3f:cd:f6:2c:70:bf:4b:f9:0d:
|
45
|
-
6a:4c:87:be:58:4d:fa:ba:33:fc:29:e3:29:6e:b3:
|
46
|
-
df:bb:4d:e7:46:93:d6:aa:40:b2:3f:cf:5d:46:5d:
|
47
|
-
8b:17:ef:05:27:23:98:b7:db:59:73:2f:d2:7d:bf:
|
48
|
-
f2:ff:67:fe:55:05:f2:4f:e7:d0:e4:43:3d:56:03:
|
49
|
-
26:25:90:f2:28:4c:21:a1:28:ea:92:b0:a1:b6:9c:
|
50
|
-
73:74:9b
|
16
|
+
00:bb:c1:de:f6:08:39:fb:f1:9a:f7:d4:68:6a:d7:
|
17
|
+
81:57:0c:09:b9:8f:39:e5:c8:b1:53:52:d8:64:0c:
|
18
|
+
e1:92:9c:ca:3f:92:46:86:5c:e2:8f:20:cf:f9:99:
|
19
|
+
d0:95:46:51:7e:55:f7:3d:62:1b:a4:e7:79:31:0c:
|
20
|
+
39:9d:23:bc:00:6f:2f:3d:5f:d4:88:1b:d0:9c:42:
|
21
|
+
26:45:1b:11:b2:d7:45:f5:aa:2f:07:43:da:bc:ab:
|
22
|
+
43:cb:0b:12:59:41:24:c3:bb:86:7f:2d:1a:c9:26:
|
23
|
+
d7:6b:25:57:48:9c:88:1a:20:fb:65:01:71:27:0c:
|
24
|
+
24:a7:23:40:dc:b6:69:4d:55:ef:14:ba:bd:05:b6:
|
25
|
+
cf:5e:b0:c2:f6:56:bc:88:e9:81:04:94:80:9b:cf:
|
26
|
+
ee:f3:15:05:79:61:41:21:4a:a1:23:29:66:90:e9:
|
27
|
+
d7:03:1e:4f:30:bd:81:46:e4:9b:ab:1f:f8:02:5c:
|
28
|
+
58:98:48:c5:50:16:16:80:0d:25:be:53:27:aa:8b:
|
29
|
+
ca:6c:d5:d9:89:50:2b:38:a6:55:fe:c3:0a:6a:db:
|
30
|
+
9c:1e:23:a2:84:93:4f:d1:a1:3d:00:48:ab:c1:2a:
|
31
|
+
3c:0a:59:a8:5b:d4:88:32:54:a9:de:88:de:1a:82:
|
32
|
+
ef:61:fa:90:fa:42:3d:1d:a8:98:d6:3b:a5:d4:eb:
|
33
|
+
c6:cf
|
51
34
|
Exponent: 65537 (0x10001)
|
52
35
|
X509v3 extensions:
|
36
|
+
X509v3 Authority Key Identifier:
|
37
|
+
keyid:B7:6B:A2:EA:A8:AA:84:8C:79:EA:B4:DA:0F:98:B2:C5:95:76:B9:F4
|
38
|
+
|
39
|
+
X509v3 Subject Key Identifier:
|
40
|
+
3D:23:31:1E:EA:1C:8D:8A:09:AA:2D:2A:84:BF:06:31:DE:87:04:01
|
41
|
+
X509v3 Subject Alternative Name:
|
42
|
+
DNS:*.mongodb-dev.net, DNS:mongodb-dev.net
|
53
43
|
X509v3 Key Usage: critical
|
54
44
|
Digital Signature, Key Encipherment
|
55
45
|
X509v3 Extended Key Usage:
|
56
46
|
TLS Web Server Authentication, TLS Web Client Authentication
|
57
|
-
X509v3
|
58
|
-
CA:FALSE
|
59
|
-
X509v3 Subject Key Identifier:
|
60
|
-
51:08:03:39:2B:B7:41:3E:23:62:B9:88:A6:63:57:F8:44:FA:F2:4E
|
61
|
-
X509v3 Authority Key Identifier:
|
62
|
-
keyid:14:2E:B3:17:B7:58:56:CB:AE:50:09:40:E6:1F:AF:9D:8B:14:C2:C6
|
47
|
+
X509v3 CRL Distribution Points:
|
63
48
|
|
64
|
-
|
65
|
-
|
66
|
-
|
49
|
+
Full Name:
|
50
|
+
URI:http://crl3.digicert.com/DigiCertTLSRSASHA2562020CA1.crl
|
51
|
+
|
52
|
+
Full Name:
|
53
|
+
URI:http://crl4.digicert.com/DigiCertTLSRSASHA2562020CA1.crl
|
67
54
|
|
68
|
-
X509v3 Subject Alternative Name:
|
69
|
-
DNS:*.e10cb93a9cec74689d88fe1d.zbmx1.mongodb.net, DNS:*.zbmx1.mesh.mongodb.net, DNS:*.zbmx1.mongodb.net
|
70
55
|
X509v3 Certificate Policies:
|
71
|
-
Policy: 2.23.140.1.2.
|
72
|
-
|
73
|
-
|
56
|
+
Policy: 2.23.140.1.2.2
|
57
|
+
CPS: http://www.digicert.com/CPS
|
58
|
+
|
59
|
+
Authority Information Access:
|
60
|
+
OCSP - URI:http://ocsp.digicert.com
|
61
|
+
CA Issuers - URI:http://cacerts.digicert.com/DigiCertTLSRSASHA2562020CA1.crt
|
74
62
|
|
63
|
+
X509v3 Basic Constraints: critical
|
64
|
+
CA:FALSE
|
75
65
|
CT Precertificate SCTs:
|
76
66
|
Signed Certificate Timestamp:
|
77
67
|
Version : v1 (0x0)
|
78
|
-
Log ID :
|
79
|
-
|
80
|
-
Timestamp :
|
68
|
+
Log ID : 29:79:BE:F0:9E:39:39:21:F0:56:73:9F:63:A5:77:E5:
|
69
|
+
BE:57:7D:9C:60:0A:F8:F9:4D:5D:26:5C:25:5D:C7:84
|
70
|
+
Timestamp : Apr 27 23:28:05.994 2021 GMT
|
81
71
|
Extensions: none
|
82
72
|
Signature : ecdsa-with-SHA256
|
83
|
-
30:
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
73
|
+
30:45:02:20:42:20:09:2C:F8:4F:9C:4D:70:0C:1D:A6:
|
74
|
+
39:A1:EC:20:4B:54:4B:50:5E:B5:B9:71:1F:6B:60:BC:
|
75
|
+
65:5B:E7:0F:02:21:00:BA:DE:65:82:26:65:7C:D7:01:
|
76
|
+
7C:36:51:71:CF:F7:2C:09:7B:C7:9A:1F:E4:6D:8E:11:
|
77
|
+
7E:DB:60:52:BC:82:8B
|
88
78
|
Signed Certificate Timestamp:
|
89
79
|
Version : v1 (0x0)
|
90
|
-
Log ID :
|
91
|
-
|
92
|
-
Timestamp :
|
80
|
+
Log ID : 22:45:45:07:59:55:24:56:96:3F:A1:2F:F1:F7:6D:86:
|
81
|
+
E0:23:26:63:AD:C0:4B:7F:5D:C6:83:5C:6E:E2:0F:02
|
82
|
+
Timestamp : Apr 27 23:28:05.942 2021 GMT
|
93
83
|
Extensions: none
|
94
84
|
Signature : ecdsa-with-SHA256
|
95
|
-
30:
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
85
|
+
30:44:02:20:0C:6B:5C:7F:31:B5:24:10:73:23:AF:27:
|
86
|
+
20:11:58:9E:40:A6:6A:BB:D8:48:0F:D1:4A:F1:F8:A9:
|
87
|
+
B0:30:1E:34:02:20:13:04:B5:82:28:59:D7:0B:86:7F:
|
88
|
+
C6:22:6E:9C:67:FF:F1:A3:9F:BF:54:AB:0D:B8:1A:8E:
|
89
|
+
16:D2:F1:8E:37:FF
|
90
|
+
Signed Certificate Timestamp:
|
91
|
+
Version : v1 (0x0)
|
92
|
+
Log ID : 51:A3:B0:F5:FD:01:79:9C:56:6D:B8:37:78:8F:0C:A4:
|
93
|
+
7A:CC:1B:27:CB:F7:9E:88:42:9A:0D:FE:D4:8B:05:E5
|
94
|
+
Timestamp : Apr 27 23:28:06.392 2021 GMT
|
95
|
+
Extensions: none
|
96
|
+
Signature : ecdsa-with-SHA256
|
97
|
+
30:46:02:21:00:D0:FE:FE:CA:E2:72:85:3A:A6:13:D0:
|
98
|
+
ED:55:8B:67:AF:86:F4:D7:BE:66:67:BB:99:BF:7C:10:
|
99
|
+
2D:28:0E:49:C3:02:21:00:BF:FF:BA:B8:4D:D1:B7:6A:
|
100
|
+
6B:E9:B3:E5:A6:93:CA:14:37:70:C1:4F:89:89:66:58:
|
101
|
+
3F:AA:22:B0:1E:F9:14:DF
|
100
102
|
Signature Algorithm: sha256WithRSAEncryption
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
103
|
+
78:e3:4f:d2:0f:56:13:0d:a3:5d:1a:68:d7:64:f5:60:d2:37:
|
104
|
+
7e:94:d7:4d:d3:5f:11:27:e8:0b:2c:74:6f:23:08:24:94:ba:
|
105
|
+
fc:b8:8a:33:3f:99:18:83:cd:4f:14:3a:82:f9:ba:f3:ff:2c:
|
106
|
+
b1:f5:c9:be:af:fd:16:79:bd:cf:39:ba:5c:47:88:b1:b1:23:
|
107
|
+
6b:6d:1c:67:5d:98:52:58:1d:72:ee:7e:c5:4b:e4:03:ca:ba:
|
108
|
+
47:bf:89:c5:48:c2:b1:0b:9c:3e:ed:3e:04:19:62:66:4c:c6:
|
109
|
+
44:6f:db:33:20:14:b1:df:c1:8f:3a:21:c1:59:0e:f8:70:3c:
|
110
|
+
fe:e0:ad:77:7b:5d:8c:de:a3:cd:d0:5c:84:36:10:00:42:28:
|
111
|
+
ee:7c:32:28:4d:41:94:3c:e4:36:7e:e5:d2:b3:d9:6f:f3:f5:
|
112
|
+
63:24:3f:9f:c6:64:cc:32:23:7e:fd:00:f4:c3:89:ac:5f:28:
|
113
|
+
f2:a3:af:a9:21:47:b1:f4:48:7c:79:6d:e7:6e:b8:35:15:ea:
|
114
|
+
6d:f2:13:35:8f:56:ea:e6:47:fb:a9:b4:f6:64:ee:b9:e8:07:
|
115
|
+
73:de:ef:20:c0:36:a9:10:bf:4a:df:29:90:fb:fc:05:85:f0:
|
116
|
+
62:94:7e:74:3a:42:cb:01:3d:ef:65:82:48:b8:87:8e:0e:17:
|
117
|
+
cb:6c:a0:dc
|
118
|
+
|
116
119
|
-----BEGIN CERTIFICATE-----
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
120
|
+
MIIGwTCCBamgAwIBAgIQCNyTVTZtxZIg0KNMoRmrLTANBgkqhkiG9w0BAQsFADBP
|
121
|
+
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMSkwJwYDVQQDEyBE
|
122
|
+
aWdpQ2VydCBUTFMgUlNBIFNIQTI1NiAyMDIwIENBMTAeFw0yMTA0MjcwMDAwMDBa
|
123
|
+
Fw0yMjA1MjUyMzU5NTlaMGcxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9y
|
124
|
+
azERMA8GA1UEBxMITmV3IFlvcmsxFjAUBgNVBAoTDU1vbmdvREIsIEluYy4xGjAY
|
125
|
+
BgNVBAMMESoubW9uZ29kYi1kZXYubmV0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
|
126
|
+
MIIBCgKCAQEAu8He9gg5+/Ga99RoateBVwwJuY855cixU1LYZAzhkpzKP5JGhlzi
|
127
|
+
jyDP+ZnQlUZRflX3PWIbpOd5MQw5nSO8AG8vPV/UiBvQnEImRRsRstdF9aovB0Pa
|
128
|
+
vKtDywsSWUEkw7uGfy0aySbXayVXSJyIGiD7ZQFxJwwkpyNA3LZpTVXvFLq9BbbP
|
129
|
+
XrDC9la8iOmBBJSAm8/u8xUFeWFBIUqhIylmkOnXAx5PML2BRuSbqx/4AlxYmEjF
|
130
|
+
UBYWgA0lvlMnqovKbNXZiVArOKZV/sMKatucHiOihJNP0aE9AEirwSo8ClmoW9SI
|
131
|
+
MlSp3ojeGoLvYfqQ+kI9HaiY1jul1OvGzwIDAQABo4IDfzCCA3swHwYDVR0jBBgw
|
132
|
+
FoAUt2ui6qiqhIx56rTaD5iyxZV2ufQwHQYDVR0OBBYEFD0jMR7qHI2KCaotKoS/
|
133
|
+
BjHehwQBMC0GA1UdEQQmMCSCESoubW9uZ29kYi1kZXYubmV0gg9tb25nb2RiLWRl
|
134
|
+
di5uZXQwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEF
|
135
|
+
BQcDAjCBiwYDVR0fBIGDMIGAMD6gPKA6hjhodHRwOi8vY3JsMy5kaWdpY2VydC5j
|
136
|
+
b20vRGlnaUNlcnRUTFNSU0FTSEEyNTYyMDIwQ0ExLmNybDA+oDygOoY4aHR0cDov
|
137
|
+
L2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0VExTUlNBU0hBMjU2MjAyMENBMS5j
|
138
|
+
cmwwPgYDVR0gBDcwNTAzBgZngQwBAgIwKTAnBggrBgEFBQcCARYbaHR0cDovL3d3
|
139
|
+
dy5kaWdpY2VydC5jb20vQ1BTMH0GCCsGAQUFBwEBBHEwbzAkBggrBgEFBQcwAYYY
|
140
|
+
aHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEcGCCsGAQUFBzAChjtodHRwOi8vY2Fj
|
141
|
+
ZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRUTFNSU0FTSEEyNTYyMDIwQ0ExLmNy
|
142
|
+
dDAMBgNVHRMBAf8EAjAAMIIBfgYKKwYBBAHWeQIEAgSCAW4EggFqAWgAdgApeb7w
|
143
|
+
njk5IfBWc59jpXflvld9nGAK+PlNXSZcJV3HhAAAAXkVqUdqAAAEAwBHMEUCIEIg
|
144
|
+
CSz4T5xNcAwdpjmh7CBLVEtQXrW5cR9rYLxlW+cPAiEAut5lgiZlfNcBfDZRcc/3
|
145
|
+
LAl7x5of5G2OEX7bYFK8gosAdQAiRUUHWVUkVpY/oS/x922G4CMmY63AS39dxoNc
|
146
|
+
buIPAgAAAXkVqUc2AAAEAwBGMEQCIAxrXH8xtSQQcyOvJyARWJ5Apmq72EgP0Urx
|
147
|
+
+KmwMB40AiATBLWCKFnXC4Z/xiJunGf/8aOfv1SrDbgajhbS8Y43/wB3AFGjsPX9
|
148
|
+
AXmcVm24N3iPDKR6zBsny/eeiEKaDf7UiwXlAAABeRWpSPgAAAQDAEgwRgIhAND+
|
149
|
+
/sricoU6phPQ7VWLZ6+G9Ne+Zme7mb98EC0oDknDAiEAv/+6uE3Rt2pr6bPlppPK
|
150
|
+
FDdwwU+JiWZYP6oisB75FN8wDQYJKoZIhvcNAQELBQADggEBAHjjT9IPVhMNo10a
|
151
|
+
aNdk9WDSN36U103TXxEn6AssdG8jCCSUuvy4ijM/mRiDzU8UOoL5uvP/LLH1yb6v
|
152
|
+
/RZ5vc85ulxHiLGxI2ttHGddmFJYHXLufsVL5APKuke/icVIwrELnD7tPgQZYmZM
|
153
|
+
xkRv2zMgFLHfwY86IcFZDvhwPP7grXd7XYzeo83QXIQ2EABCKO58MihNQZQ85DZ+
|
154
|
+
5dKz2W/z9WMkP5/GZMwyI379APTDiaxfKPKjr6khR7H0SHx5beduuDUV6m3yEzWP
|
155
|
+
VurmR/uptPZk7rnoB3Pe7yDANqkQv0rfKZD7/AWF8GKUfnQ6QssBPe9lgki4h44O
|
156
|
+
F8tsoNw=
|
157
|
+
-----END CERTIFICATE-----
|
@@ -246,9 +246,8 @@ module CommonShortcuts
|
|
246
246
|
# must be closed in the scope of the example.
|
247
247
|
register_server(server)
|
248
248
|
description = Mongo::Server::Description.new(
|
249
|
-
address,
|
250
|
-
|
251
|
-
average_round_trip_time,
|
249
|
+
address, config,
|
250
|
+
average_round_trip_time: average_round_trip_time,
|
252
251
|
)
|
253
252
|
server.tap do |s|
|
254
253
|
allow(s).to receive(:description).and_return(description)
|
data/spec/support/matchers.rb
CHANGED
@@ -73,3 +73,16 @@ RSpec::Matchers.define :take_shorter_than do |min_expected_time|
|
|
73
73
|
(Time.now - start_time).should < min_expected_time
|
74
74
|
end
|
75
75
|
end
|
76
|
+
|
77
|
+
RSpec::Matchers.define :be_explain_output do
|
78
|
+
match do |actual|
|
79
|
+
Hash === actual && (
|
80
|
+
actual.key?('queryPlanner') ||
|
81
|
+
actual.key?('allPlans')
|
82
|
+
)
|
83
|
+
end
|
84
|
+
|
85
|
+
failure_message do |actual|
|
86
|
+
"expected that #{actual} is explain output: is a hash with either allPlans or queryPlanner keys present"
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
shared_context 'auth unit tests' do
|
2
|
+
let(:generation_manager) do
|
3
|
+
Mongo::Server::ConnectionPool::GenerationManager.new(server: server)
|
4
|
+
end
|
5
|
+
|
6
|
+
let(:pool) do
|
7
|
+
double('pool').tap do |pool|
|
8
|
+
allow(pool).to receive(:generation_manager).and_return(generation_manager)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:connection) do
|
13
|
+
Mongo::Server::Connection.new(server, SpecConfig.instance.monitoring_options.merge(
|
14
|
+
connection_pool: pool))
|
15
|
+
end
|
16
|
+
end
|
@@ -185,7 +185,7 @@ end
|
|
185
185
|
|
186
186
|
shared_examples 'an operation supporting causally consistent reads' do
|
187
187
|
|
188
|
-
let(:subscriber) { EventSubscriber.new }
|
188
|
+
let(:subscriber) { Mrss::EventSubscriber.new }
|
189
189
|
|
190
190
|
let(:client) do
|
191
191
|
authorized_client.tap do |client|
|
@@ -622,7 +622,7 @@ shared_examples 'an operation updating cluster time' do
|
|
622
622
|
client.start_session
|
623
623
|
end
|
624
624
|
|
625
|
-
let(:subscriber) { EventSubscriber.new }
|
625
|
+
let(:subscriber) { Mrss::EventSubscriber.new }
|
626
626
|
|
627
627
|
let(:client) do
|
628
628
|
authorized_client.tap do |client|
|
data/spec/support/spec_config.rb
CHANGED
@@ -15,7 +15,10 @@ class SpecConfig
|
|
15
15
|
if ENV['MONGODB_URI']
|
16
16
|
@mongodb_uri = Mongo::URI.new(ENV['MONGODB_URI'])
|
17
17
|
@uri_options = Mongo::Options::Mapper.transform_keys_to_symbols(@mongodb_uri.uri_options)
|
18
|
-
if
|
18
|
+
if ENV['TOPOLOGY'] == 'load-balanced'
|
19
|
+
@addresses = @mongodb_uri.servers
|
20
|
+
@connect_options = { connect: :load_balanced }
|
21
|
+
elsif @uri_options[:replica_set]
|
19
22
|
@addresses = @mongodb_uri.servers
|
20
23
|
@connect_options = { connect: :replica_set, replica_set: @uri_options[:replica_set] }
|
21
24
|
elsif @uri_options[:connect] == :sharded || ENV['TOPOLOGY'] == 'sharded-cluster'
|
@@ -30,15 +33,6 @@ class SpecConfig
|
|
30
33
|
else
|
31
34
|
@ssl = @uri_options[:ssl]
|
32
35
|
end
|
33
|
-
elsif ENV['MONGODB_ADDRESSES']
|
34
|
-
@addresses = ENV['MONGODB_ADDRESSES'] ? ENV['MONGODB_ADDRESSES'].split(',').freeze : [ '127.0.0.1:27017' ].freeze
|
35
|
-
if ENV['RS_ENABLED']
|
36
|
-
@connect_options = { connect: :replica_set, replica_set: ENV['RS_NAME'] }
|
37
|
-
elsif ENV['SHARDED_ENABLED']
|
38
|
-
@connect_options = { connect: :sharded }
|
39
|
-
else
|
40
|
-
@connect_options = { connect: :direct }
|
41
|
-
end
|
42
36
|
end
|
43
37
|
|
44
38
|
@uri_tls_options = {}
|
@@ -634,4 +628,9 @@ EOT
|
|
634
628
|
creds
|
635
629
|
end
|
636
630
|
end
|
631
|
+
|
632
|
+
# Returns whether the test suite was configured with a single mongos.
|
633
|
+
def single_mongos?
|
634
|
+
%w(1 true yes).include?(ENV['SINGLE_MONGOS'])
|
635
|
+
end
|
637
636
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
class UsingHash < Hash
|
5
|
+
def use(key)
|
6
|
+
wrap(self[key]).tap do
|
7
|
+
delete(key)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def use!(key)
|
12
|
+
wrap(fetch(key)).tap do
|
13
|
+
delete(key)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def wrap(v)
|
20
|
+
case v
|
21
|
+
when Hash
|
22
|
+
self.class[v]
|
23
|
+
when Array
|
24
|
+
v.map do |subv|
|
25
|
+
wrap(subv)
|
26
|
+
end
|
27
|
+
else
|
28
|
+
v
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/spec/support/utils.rb
CHANGED
@@ -556,7 +556,7 @@ module Utils
|
|
556
556
|
# command event published, asserts the command event published has the
|
557
557
|
# specified command name, and returns the published event.
|
558
558
|
module_function def get_command_event(client, command_name, include_auth: false)
|
559
|
-
subscriber = EventSubscriber.new
|
559
|
+
subscriber = Mrss::EventSubscriber.new
|
560
560
|
client.subscribe(Mongo::Monitoring::COMMAND, subscriber)
|
561
561
|
begin
|
562
562
|
yield client
|
data.tar.gz.sig
CHANGED
Binary file
|