File tree Expand file tree Collapse file tree 5 files changed +16
-12
lines changed Expand file tree Collapse file tree 5 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -48,14 +48,11 @@ jobs:
48
48
sudo apt-get update
49
49
sudo apt-get install -y docker-compose
50
50
51
- - name : Start services with Docker Compose
52
- run : docker-compose -f config/sentinel/docker-compose.yaml up -d
53
-
54
51
- uses : ruby/setup-ruby@v1
55
52
with :
56
53
ruby-version : ${{matrix.ruby}}
57
54
bundler-cache : true
58
55
59
56
- name : Run tests
60
57
timeout-minutes : 10
61
- run : bundle exec bake test
58
+ run : docker-compose -f config/sentinel/docker-compose.yaml up
Original file line number Diff line number Diff line change @@ -13,4 +13,13 @@ services:
13
13
- ./sentinel.conf:/etc/redis/sentinel.conf
14
14
depends_on :
15
15
- redis-master
16
- - redis-slave
16
+ - redis-slave
17
+ tests :
18
+ image : ruby
19
+ volumes :
20
+ - ../../:/code
21
+ command : bash -c "cd /code && bundle install && bundle exec sus test/async/redis/sentinel_client.rb"
22
+ depends_on :
23
+ - redis-master
24
+ - redis-slave
25
+ - redis-sentinel
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ def resolve_address
47
47
raise ArgumentError , "Unknown instance role #{ @role } "
48
48
end => address
49
49
50
+ Console . info ( self , "Resolved #{ @role } address: #{ address } " )
51
+
50
52
address or raise RuntimeError , "Unable to fetch #{ @role } via Sentinel."
51
53
end
52
54
Original file line number Diff line number Diff line change 12
12
describe Async ::Redis ::SentinelClient do
13
13
include Sus ::Fixtures ::Async ::ReactorContext
14
14
15
- let ( :master_host ) { ENV [ 'ASYNC_REDIS_MASTER' ] }
16
- let ( :slave_host ) { ENV [ 'ASYNC_REDIS_SLAVE' ] }
17
- let ( :sentinel_host ) { ENV [ 'ASYNC_REDIS_SENTINEL' ] }
15
+ let ( :master_host ) { "redis://redis-master:6379" }
16
+ let ( :slave_host ) { "redis://redis-slave:6379" }
17
+ let ( :sentinel_host ) { "redis://redis-sentinel:26379" }
18
18
19
19
let ( :sentinels ) { [
20
20
Async ::Redis ::Endpoint . parse ( sentinel_host )
You can’t perform that action at this time.
0 commit comments