1
0
mirror of https://github.com/redis/go-redis.git synced 2025-08-10 11:03:00 +03:00

Don't panic when cluster does not have valid nodes.

This commit is contained in:
Vladimir Mihailenco
2016-09-23 11:52:19 +00:00
parent 938235994e
commit c0b792a059
2 changed files with 24 additions and 8 deletions

View File

@@ -515,6 +515,19 @@ var _ = Describe("ClusterClient", func() {
describeClusterClient()
})
Describe("ClusterClient without valid nodes", func() {
BeforeEach(func() {
client = redis.NewClusterClient(&redis.ClusterOptions{
Addrs: []string{redisAddr},
})
})
It("returns an error", func() {
err := client.Ping().Err()
Expect(err).To(MatchError("ERR This instance has cluster support disabled"))
})
})
})
//------------------------------------------------------------------------------