From 5fec34b90142b1bfd3bfa206bb582415d850e319 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Mon, 29 Jun 2020 15:16:05 +0300 Subject: [PATCH] Fix build --- internal_test.go | 4 +++- ring_test.go | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/internal_test.go b/internal_test.go index 139b290a..b1dd0bdd 100644 --- a/internal_test.go +++ b/internal_test.go @@ -9,7 +9,9 @@ var _ = Describe("newClusterState", func() { var state *clusterState createClusterState := func(slots []ClusterSlot) *clusterState { - nodes := newClusterNodes(&ClusterOptions{}) + opt := &ClusterOptions{} + opt.init() + nodes := newClusterNodes(opt) state, err := newClusterState(nodes, slots, "10.10.10.10:1234") Expect(err).NotTo(HaveOccurred()) return state diff --git a/ring_test.go b/ring_test.go index 0ea03604..1fb2b16b 100644 --- a/ring_test.go +++ b/ring_test.go @@ -180,7 +180,8 @@ var _ = Describe("Redis Ring", func() { ring = redis.NewRing(opts) err := ring.Ping().Err() - Expect(err).To(MatchError("ERR Client sent AUTH, but no password is set")) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring("ERR AUTH")) }) It("can be initialized with a passwords map, one for each shard", func() { @@ -192,7 +193,8 @@ var _ = Describe("Redis Ring", func() { ring = redis.NewRing(opts) err := ring.Ping().Err() - Expect(err).To(MatchError("ERR Client sent AUTH, but no password is set")) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(ContainSubstring("ERR AUTH")) }) })