Skip to content

Commit 46960f4

Browse files
committed
Actual test.
1 parent 427ef77 commit 46960f4

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.github/workflows/test-sentinel.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ permissions:
77

88
env:
99
CONSOLE_OUTPUT: XTerm
10-
ASYNC_REDIS_MASTER: "redis-master:6379"
11-
ASYNC_REDIS_SLAVE: "redis-slave:6379"
12-
ASYNC_REDIS_SENTINEL: "redis-sentinel:26379"
10+
ASYNC_REDIS_MASTER: "redis://redis-master:6379"
11+
ASYNC_REDIS_SLAVE: "redis://redis-slave:6379"
12+
ASYNC_REDIS_SENTINEL: "redis://redis-sentinel:26379"
1313

1414
jobs:
1515
test:

test/async/redis/sentinel_client.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,20 @@
1616
let(:slave_host) {ENV['ASYNC_REDIS_SLAVE']}
1717
let(:sentinel_host) {ENV['ASYNC_REDIS_SENTINEL']}
1818

19+
let(:sentinels) {[
20+
Async::Redis::Endpoint.parse(sentinel_host)
21+
]}
22+
23+
let(:client) {subject.new(sentinels)}
24+
let(:slave_client) {subject.new(sentinels, role: :slave)}
25+
1926
it "should resolve master address" do
2027
unless master_host and slave_host and sentinel_host
2128
skip("No sentinel host provided.")
29+
30+
client.set("key", "value")
31+
32+
expect(slave_client.get("key")).to be == "value"
2233
end
2334
end
2435
end

0 commit comments

Comments
 (0)