Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Describe 'register_to_sentinel.sh'
It 'constructs the sentinel down-after-milliseconds sub command correctly'
When call construct_sentinel_sub_command "down-after-milliseconds" "redis-redis" "redis-redis-0.redis-redis.default.svc.cluster.local" "6379"
The status should be success
The output should eq "SENTINEL set redis-redis down-after-milliseconds 5000"
The output should eq "SENTINEL set redis-redis down-after-milliseconds 20000"
End

It 'constructs the sentinel failover-timeout sub command correctly'
Expand Down Expand Up @@ -192,7 +192,7 @@ Describe 'register_to_sentinel.sh'
When call register_to_sentinel $sentinel_host $master_name $redis_primary_host $redis_primary_port
The status should be success
The output should include "host:redis-redis-sentinel-0.redis-redis-sentinel-headless.default.svc.cluster.local, port:26379 Command:SENTINEL monitor redis-redis redis-redis-0.redis-redis.default.svc.cluster.local 6379 2"
The output should include "host:redis-redis-sentinel-0.redis-redis-sentinel-headless.default.svc.cluster.local, port:26379 Command:SENTINEL set redis-redis down-after-milliseconds 5000 executed successfully."
The output should include "host:redis-redis-sentinel-0.redis-redis-sentinel-headless.default.svc.cluster.local, port:26379 Command:SENTINEL set redis-redis down-after-milliseconds 20000 executed successfully."
The output should include "host:redis-redis-sentinel-0.redis-redis-sentinel-headless.default.svc.cluster.local, port:26379 Command:SENTINEL set redis-redis failover-timeout 60000"
The output should include "host:redis-redis-sentinel-0.redis-redis-sentinel-headless.default.svc.cluster.local, port:26379 Command:SENTINEL set redis-redis parallel-syncs 1"
The output should include "host:redis-redis-sentinel-0.redis-redis-sentinel-headless.default.svc.cluster.local, port:26379 Command:SENTINEL set redis-redis auth-user"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Describe "Redis Sentinel Member Join Script Tests"
flags
master
down-after-milliseconds
5000
20000
quorum
2
failover-timeout
Expand All @@ -87,7 +87,7 @@ Describe "Redis Sentinel Member Join Script Tests"
The status should be success
The stdout should include "all masters are reachable"
The contents of file "$redis_sentinel_real_conf" should include "sentinel monitor mymaster 172.20.0.1 30746 2"
The contents of file "$redis_sentinel_real_conf" should include "sentinel down-after-milliseconds mymaster 5000"
The contents of file "$redis_sentinel_real_conf" should include "sentinel down-after-milliseconds mymaster 20000"
The contents of file "$redis_sentinel_real_conf" should include "sentinel failover-timeout mymaster 60000"
The contents of file "$redis_sentinel_real_conf" should include "sentinel parallel-syncs mymaster 1"
The contents of file "$redis_sentinel_real_conf" should include "sentinel auth-user mymaster $REDIS_SENTINEL_USER"
Expand Down Expand Up @@ -138,7 +138,7 @@ Describe "Redis Sentinel Member Join Script Tests"
flags
master
down-after-milliseconds
5000
20000
quorum
2
failover-timeout
Expand All @@ -154,7 +154,7 @@ Describe "Redis Sentinel Member Join Script Tests"
flags
master
down-after-milliseconds
5000
20000
quorum
2
failover-timeout
Expand All @@ -166,13 +166,13 @@ Describe "Redis Sentinel Member Join Script Tests"
The status should be success
The stdout should include "all masters are reachable"
The contents of file "$redis_sentinel_real_conf" should include "sentinel monitor redis-redis0 172.20.0.1 30746 2"
The contents of file "$redis_sentinel_real_conf" should include "sentinel down-after-milliseconds redis-redis0 5000"
The contents of file "$redis_sentinel_real_conf" should include "sentinel down-after-milliseconds redis-redis0 20000"
The contents of file "$redis_sentinel_real_conf" should include "sentinel failover-timeout redis-redis0 60000"
The contents of file "$redis_sentinel_real_conf" should include "sentinel parallel-syncs redis-redis0 1"
The contents of file "$redis_sentinel_real_conf" should include "sentinel auth-user redis-redis0 $REDIS_SENTINEL_USER"
The contents of file "$redis_sentinel_real_conf" should include "sentinel auth-pass redis-redis0 $REDIS_SENTINEL_PASSWORD_REDIS0"
The contents of file "$redis_sentinel_real_conf" should include "sentinel monitor redis-redis1 172.20.0.2 30747 2"
The contents of file "$redis_sentinel_real_conf" should include "sentinel down-after-milliseconds redis-redis1 5000"
The contents of file "$redis_sentinel_real_conf" should include "sentinel down-after-milliseconds redis-redis1 20000"
The contents of file "$redis_sentinel_real_conf" should include "sentinel failover-timeout redis-redis1 60000"
The contents of file "$redis_sentinel_real_conf" should include "sentinel parallel-syncs redis-redis1 1"
The contents of file "$redis_sentinel_real_conf" should include "sentinel auth-user redis-redis1 $REDIS_SENTINEL_USER"
Expand Down
2 changes: 1 addition & 1 deletion addons/redis/scripts/redis-register-to-sentinel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ construct_sentinel_sub_command() {
echo "SENTINEL monitor $master_name $redis_primary_host $redis_primary_port 2"
;;
"down-after-milliseconds")
echo "SENTINEL set $master_name down-after-milliseconds 5000"
echo "SENTINEL set $master_name down-after-milliseconds 20000"
;;
"failover-timeout")
echo "SENTINEL set $master_name failover-timeout 60000"
Expand Down