File tree Expand file tree Collapse file tree 5 files changed +10
-4
lines changed Expand file tree Collapse file tree 5 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -427,7 +427,6 @@ axes:
427
427
display_name : Sharded Cluster
428
428
variables :
429
429
TOPOLOGY : " sharded-cluster"
430
- SINGLE_MONGOS : true
431
430
432
431
- id : " auth"
433
432
display_name : Authentication
Original file line number Diff line number Diff line change 54
54
display_name: Sharded Cluster
55
55
variables:
56
56
TOPOLOGY: "sharded-cluster"
57
- SINGLE_MONGOS: true
58
57
59
58
- id: "auth"
60
59
display_name: Authentication
Original file line number Diff line number Diff line change 93
93
94
94
export BUNDLE_GEMFILE
95
95
96
- export MONGODB_URI=" mongodb://localhost:27017/?appName=test-suite&$uri_options "
96
+ if test " $TOPOLOGY " = " sharded-cluster" ; then
97
+ # We assume that sharded cluster has two mongoses
98
+ export MONGODB_URI=" mongodb://localhost:27017,localhost:27018/?appName=test-suite&$uri_options "
99
+ else
100
+ export MONGODB_URI=" mongodb://localhost:27017/?appName=test-suite&$uri_options "
101
+ fi
97
102
98
103
set +e
99
104
if test -n " $TEST_CMD " ; then
Original file line number Diff line number Diff line change 6
6
7
7
describe 'Sharding helpers' do
8
8
require_topology :sharded
9
+ min_server_version '4.4'
9
10
10
11
describe 'shard_collection rake task' do
11
12
let ( :shard_collections ) do
Original file line number Diff line number Diff line change 3
3
4
4
module Mongoid
5
5
module Expectations
6
-
7
6
def connection_class
8
7
if defined? ( Mongo ::Server ::ConnectionBase )
9
8
Mongo ::Server ::ConnectionBase
@@ -14,6 +13,9 @@ def connection_class
14
13
end
15
14
16
15
def expect_query ( number )
16
+ if %i[ sharded load-balanced ] . include? ( ClusterConfig . instance . topology ) && number > 0
17
+ skip 'This spec requires replica set or standalone topology'
18
+ end
17
19
rv = nil
18
20
RSpec ::Mocks . with_temporary_scope do
19
21
if number > 0
You can’t perform that action at this time.
0 commit comments