(slots, wanted []redis.ClusterSlot)
| 227 | } |
| 228 | |
| 229 | func assertSlotsEqual(slots, wanted []redis.ClusterSlot) error { |
| 230 | outerLoop: |
| 231 | for _, s2 := range wanted { |
| 232 | for _, s1 := range slots { |
| 233 | if slotEqual(s1, s2) { |
| 234 | continue outerLoop |
| 235 | } |
| 236 | } |
| 237 | return fmt.Errorf("%v not found in %v", s2, slots) |
| 238 | } |
| 239 | return nil |
| 240 | } |
| 241 | |
| 242 | func slotEqual(s1, s2 redis.ClusterSlot) bool { |
| 243 | if s1.Start != s2.Start { |
no test coverage detected