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:
@@ -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"))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user