File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -739,5 +739,21 @@ var _ = Describe("Server", func() {
739739 Expect (client .Get (ctx , "foo" ).Err ()).To (MatchError (redis .Nil ))
740740 Expect (client .Get (ctx , "key1" ).Err ()).To (MatchError (redis .Nil ))
741741 })
742+
743+ It ("should load admin-cmd-list from config correctly" , func () {
744+ configGet := client .ConfigGet (ctx , "admin-cmd-list" )
745+ Expect (configGet .Err ()).NotTo (HaveOccurred ())
746+ Expect (configGet .Val ()).To (HaveLen (1 ))
747+
748+ adminCmdList , ok := configGet .Val ()["admin-cmd-list" ]
749+ Expect (ok ).To (BeTrue ())
750+
751+ // 验证默认配置中包含了auth和config命令(修复的核心功能)
752+ Expect (adminCmdList ).To (ContainSubstring ("auth" ))
753+ Expect (adminCmdList ).To (ContainSubstring ("config" ))
754+ Expect (adminCmdList ).To (ContainSubstring ("info" ))
755+ Expect (adminCmdList ).To (ContainSubstring ("ping" ))
756+ Expect (adminCmdList ).To (ContainSubstring ("monitor" ))
757+ })
742758 })
743759})
You can’t perform that action at this time.
0 commit comments