1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

add tests

This commit is contained in:
Nedyalko Dyakov
2025-04-22 15:35:57 +03:00
parent e0c224ddb4
commit 44628c5dbd
7 changed files with 619 additions and 28 deletions

View File

@ -298,7 +298,7 @@ var _ = Describe("Probabilistic commands", Label("probabilistic"), func() {
})
It("should CFCount", Label("cuckoo", "cfcount"), func() {
err := client.CFAdd(ctx, "testcf1", "item1").Err()
client.CFAdd(ctx, "testcf1", "item1")
cnt, err := client.CFCount(ctx, "testcf1", "item1").Result()
Expect(err).NotTo(HaveOccurred())
Expect(cnt).To(BeEquivalentTo(int64(1)))
@ -394,7 +394,7 @@ var _ = Describe("Probabilistic commands", Label("probabilistic"), func() {
NoCreate: true,
}
result, err := client.CFInsert(ctx, "testcf1", args, "item1", "item2", "item3").Result()
_, err := client.CFInsert(ctx, "testcf1", args, "item1", "item2", "item3").Result()
Expect(err).To(HaveOccurred())
args = &redis.CFInsertOptions{
@ -402,7 +402,7 @@ var _ = Describe("Probabilistic commands", Label("probabilistic"), func() {
NoCreate: false,
}
result, err = client.CFInsert(ctx, "testcf1", args, "item1", "item2", "item3").Result()
result, err := client.CFInsert(ctx, "testcf1", args, "item1", "item2", "item3").Result()
Expect(err).NotTo(HaveOccurred())
Expect(len(result)).To(BeEquivalentTo(3))
})