Skip to content

Commit 26ab782

Browse files
committed
test: add test for fix add auth command to admin-thread-pool
1 parent 75e7e59 commit 26ab782

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/integration/server_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@ var _ = Describe("Server", func() {
740740
Expect(client.Get(ctx, "key1").Err()).To(MatchError(redis.Nil))
741741
})
742742

743+
//fix: added the correct loading of admin-cmd-list in the configuration file
743744
It("should load admin-cmd-list from config correctly", func() {
744745
configGet := client.ConfigGet(ctx, "admin-cmd-list")
745746
Expect(configGet.Err()).NotTo(HaveOccurred())
@@ -748,12 +749,17 @@ var _ = Describe("Server", func() {
748749
adminCmdList, ok := configGet.Val()["admin-cmd-list"]
749750
Expect(ok).To(BeTrue())
750751

751-
// 验证默认配置中包含了auth和config命令(修复的核心功能)
752752
Expect(adminCmdList).To(ContainSubstring("auth"))
753753
Expect(adminCmdList).To(ContainSubstring("config"))
754754
Expect(adminCmdList).To(ContainSubstring("info"))
755755
Expect(adminCmdList).To(ContainSubstring("ping"))
756756
Expect(adminCmdList).To(ContainSubstring("monitor"))
757757
})
758+
759+
// fix add auth command to admin-thread-pool
760+
It("should process auth command in admin thread pool", func() {
761+
auth := client.Do(ctx, "auth", "wrongpassword")
762+
Expect(auth.Err()).To(HaveOccurred())
763+
})
758764
})
759765
})

0 commit comments

Comments
 (0)