Skip to content

Commit

Permalink
feat: add cluster commands tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulPancake committed Jun 27, 2024
1 parent 777db22 commit be94a8d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rueidiscompat/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ func testCluster(resp3 bool) {
Expect(err).NotTo(HaveOccurred())
Expect(strings.Split(strings.TrimSpace(nodes), "\n")).To(HaveLen(3))
})
It("ClusterMeet", func() {
Expect(adapter.ClusterMeet(ctx, "localhost", 8080).Err()).To(MatchError("Invalid node address specified: localhost:8080"))
})
It("ClusterForget", func() {
Expect(adapter.ClusterForget(ctx, "1").Err()).To(MatchError("Unknown node 1"))
})
It("ClusterReplicate", func() {
Expect(adapter.ClusterReplicate(ctx, "1").Err()).To(MatchError("Unknown node 1"))
})
It("ClusterInfo", func() {
info, err := adapter.ClusterInfo(ctx).Result()
Expect(err).NotTo(HaveOccurred())
Expand Down

0 comments on commit be94a8d

Please sign in to comment.