@@ -532,6 +532,59 @@ var _ = Describe("Commands", func() {
532532			Expect (info .Val ()).To (HaveLen (1 ))
533533		})
534534
535+ 		It ("should Info Modules" , Label ("redis.info" ), func () {
536+ 			SkipBeforeRedisMajor (8 , "modules are included in info for Redis Version >= 8" )
537+ 			info  :=  client .Info (ctx )
538+ 			Expect (info .Err ()).NotTo (HaveOccurred ())
539+ 			Expect (info .Val ()).NotTo (BeNil ())
540+ 
541+ 			info  =  client .Info (ctx , "search" )
542+ 			Expect (info .Err ()).NotTo (HaveOccurred ())
543+ 			Expect (info .Val ()).To (ContainSubstring ("search" ))
544+ 
545+ 			info  =  client .Info (ctx , "modules" )
546+ 			Expect (info .Err ()).NotTo (HaveOccurred ())
547+ 			Expect (info .Val ()).To (ContainSubstring ("search" ))
548+ 			Expect (info .Val ()).To (ContainSubstring ("ReJSON" ))
549+ 			Expect (info .Val ()).To (ContainSubstring ("timeseries" ))
550+ 			Expect (info .Val ()).To (ContainSubstring ("bf" ))
551+ 
552+ 			info  =  client .Info (ctx , "everything" )
553+ 			Expect (info .Err ()).NotTo (HaveOccurred ())
554+ 			Expect (info .Val ()).To (ContainSubstring ("search" ))
555+ 			Expect (info .Val ()).To (ContainSubstring ("ReJSON" ))
556+ 			Expect (info .Val ()).To (ContainSubstring ("timeseries" ))
557+ 			Expect (info .Val ()).To (ContainSubstring ("bf" ))
558+ 		})
559+ 
560+ 		It ("should InfoMap Modules" , Label ("redis.info" ), func () {
561+ 			SkipBeforeRedisMajor (8 , "modules are included in info for Redis Version >= 8" )
562+ 			info  :=  client .InfoMap (ctx )
563+ 			Expect (info .Err ()).NotTo (HaveOccurred ())
564+ 			Expect (info .Val ()).NotTo (BeNil ())
565+ 
566+ 			info  =  client .InfoMap (ctx , "search" )
567+ 			Expect (info .Err ()).NotTo (HaveOccurred ())
568+ 			Expect (len (info .Val ())).To (BeNumerically (">=" , 2 ))
569+ 			Expect (info .Val ()["search_version" ]).ToNot (BeNil ())
570+ 
571+ 			info  =  client .InfoMap (ctx , "modules" )
572+ 			Expect (info .Err ()).NotTo (HaveOccurred ())
573+ 			val  :=  info .Val ()
574+ 			modules , ok  :=  val ["Modules" ]
575+ 			Expect (ok ).To (BeTrue ())
576+ 			Expect (len (val )).To (BeNumerically (">=" , 2 ))
577+ 			Expect (val ["search_version" ]).ToNot (BeNil ())
578+ 			Expect (modules ["search" ]).ToNot (BeNil ())
579+ 			Expect (modules ["ReJSON" ]).ToNot (BeNil ())
580+ 			Expect (modules ["timeseries" ]).ToNot (BeNil ())
581+ 			Expect (modules ["bf" ]).ToNot (BeNil ())
582+ 
583+ 			info  =  client .InfoMap (ctx , "everything" )
584+ 			Expect (info .Err ()).NotTo (HaveOccurred ())
585+ 			Expect (len (info .Val ())).To (BeNumerically (">=" , 10 ))
586+ 		})
587+ 
535588		It ("should Info cpu" , func () {
536589			info  :=  client .Info (ctx , "cpu" )
537590			Expect (info .Err ()).NotTo (HaveOccurred ())
0 commit comments