Skip to content

Commit 99ac8c0

Browse files
committed
Actual test.
1 parent 427ef77 commit 99ac8c0

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,18 @@
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+
1925
it "should resolve master address" do
2026
unless master_host and slave_host and sentinel_host
2127
skip("No sentinel host provided.")
28+
29+
client.set("key", "value")
30+
expect(client.get("key")).to be == "value"
2231
end
2332
end
2433
end

0 commit comments

Comments
 (0)