mirror of
https://github.com/redis/go-redis.git
synced 2025-11-10 00:00:57 +03:00
feat(acl): add acl support and test (#3576)
* feat: add acl support and command test * validate client name before kill it --------- Co-authored-by: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com>
This commit is contained in:
@@ -92,6 +92,21 @@ var _ = Describe("ACL user commands", Label("NonRedisEnterprise"), func() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(res).To(HaveLen(1))
|
||||
Expect(res[0]).To(ContainSubstring("default"))
|
||||
|
||||
res, err = client.ACLUsers(ctx).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(res).To(HaveLen(1))
|
||||
Expect(res[0]).To(Equal("default"))
|
||||
|
||||
res1, err := client.ACLWhoAmI(ctx).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(res1).To(Equal("default"))
|
||||
})
|
||||
|
||||
It("gen password", func() {
|
||||
password, err := client.ACLGenPass(ctx, 0).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(password).NotTo(BeEmpty())
|
||||
})
|
||||
|
||||
It("setuser and deluser", func() {
|
||||
|
||||
Reference in New Issue
Block a user