@@ -110,7 +110,7 @@ def test_sentinel_failover_prioritize_healthy_sentinel
110
110
assert_equal commands [ :s2 ] , [ %w[ get-master-addr-by-name master1 ] , %w[ get-master-addr-by-name master1 ] ]
111
111
end
112
112
113
- def test_sentinel_with_auth
113
+ def test_sentinel_with_non_sentinel_options
114
114
sentinels = [ { :host => "127.0.0.1" , :port => 26381 } ]
115
115
116
116
commands = {
@@ -123,6 +123,10 @@ def test_sentinel_with_auth
123
123
commands [ :s1 ] << [ "auth" , pass ]
124
124
"-ERR unknown command 'auth'"
125
125
end ,
126
+ :select => lambda do |db |
127
+ commands [ :s1 ] << [ "select" , db ]
128
+ "-ERR unknown command 'select'"
129
+ end ,
126
130
:sentinel => lambda do |command , *args |
127
131
commands [ :s1 ] << [ command , *args ]
128
132
[ "127.0.0.1" , "6382" ]
@@ -142,7 +146,7 @@ def test_sentinel_with_auth
142
146
143
147
RedisMock . start ( master , { } , 6382 ) do
144
148
RedisMock . start ( sentinel , { } , 26381 ) do
145
- redis = Redis . new ( :url => "redis://:foo@master1" , :sentinels => sentinels , :role => :master )
149
+ redis = Redis . new ( :url => "redis://:foo@master1/15 " , :sentinels => sentinels , :role => :master )
146
150
147
151
assert redis . ping
148
152
end
0 commit comments