summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-redis/redis/export_test.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-08-17 17:19:06 -0700
committerGitHub <noreply@github.com>2017-08-17 17:19:06 -0700
commit96eab1202717e073782ec399a4e0820cae15b1bb (patch)
tree011012982be971c7e9ef91466f026bc0956ac9a2 /vendor/github.com/go-redis/redis/export_test.go
parent2c895ee66eed626721135acfcc48254c6e3f3b29 (diff)
downloadchat-96eab1202717e073782ec399a4e0820cae15b1bb.tar.gz
chat-96eab1202717e073782ec399a4e0820cae15b1bb.tar.bz2
chat-96eab1202717e073782ec399a4e0820cae15b1bb.zip
Updating server dependancies. (#7246)
Diffstat (limited to 'vendor/github.com/go-redis/redis/export_test.go')
-rw-r--r--vendor/github.com/go-redis/redis/export_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/github.com/go-redis/redis/export_test.go b/vendor/github.com/go-redis/redis/export_test.go
index b88e41be9..3b7965d79 100644
--- a/vendor/github.com/go-redis/redis/export_test.go
+++ b/vendor/github.com/go-redis/redis/export_test.go
@@ -28,8 +28,9 @@ func (c *ClusterClient) SlotAddrs(slot int) []string {
}
// SwapSlot swaps a slot's master/slave address for testing MOVED redirects.
-func (c *ClusterClient) SwapSlotNodes(slot int) []string {
+func (c *ClusterClient) SwapSlotNodes(slot int) {
nodes := c.state().slots[slot]
- nodes[0], nodes[1] = nodes[1], nodes[0]
- return c.SlotAddrs(slot)
+ if len(nodes) == 2 {
+ nodes[0], nodes[1] = nodes[1], nodes[0]
+ }
}