mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Add RE tests (#2847)
* Add RE tests * Enable testing on RE * change db id to 0 - only when RE cluster is set * label tests * adding secrets
This commit is contained in:
@ -65,7 +65,11 @@ var _ = Describe("Client", func() {
|
||||
})
|
||||
|
||||
It("should Stringer", func() {
|
||||
Expect(client.String()).To(Equal(fmt.Sprintf("Redis<:%s db:15>", redisPort)))
|
||||
if RECluster {
|
||||
Expect(client.String()).To(Equal(fmt.Sprintf("Redis<:%s db:0>", redisPort)))
|
||||
} else {
|
||||
Expect(client.String()).To(Equal(fmt.Sprintf("Redis<:%s db:15>", redisPort)))
|
||||
}
|
||||
})
|
||||
|
||||
It("supports context", func() {
|
||||
@ -76,7 +80,7 @@ var _ = Describe("Client", func() {
|
||||
Expect(err).To(MatchError("context canceled"))
|
||||
})
|
||||
|
||||
It("supports WithTimeout", func() {
|
||||
It("supports WithTimeout", Label("NonRedisEnterprise"), func() {
|
||||
err := client.ClientPause(ctx, time.Second).Err()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
@ -151,7 +155,7 @@ var _ = Describe("Client", func() {
|
||||
Expect(pubsub.Close()).NotTo(HaveOccurred())
|
||||
})
|
||||
|
||||
It("should select DB", func() {
|
||||
It("should select DB", Label("NonRedisEnterprise"), func() {
|
||||
db2 := redis.NewClient(&redis.Options{
|
||||
Addr: redisAddr,
|
||||
DB: 2,
|
||||
@ -503,7 +507,7 @@ var _ = Describe("Conn", func() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
|
||||
It("TxPipeline", func() {
|
||||
It("TxPipeline", Label("NonRedisEnterprise"), func() {
|
||||
tx := client.Conn().TxPipeline()
|
||||
tx.SwapDB(ctx, 0, 2)
|
||||
tx.SwapDB(ctx, 1, 0)
|
||||
|
Reference in New Issue
Block a user