mirror of
https://github.com/redis/go-redis.git
synced 2025-07-25 08:21:55 +03:00
Merge branch 'master' into ndyakov/token-based-auth
This commit is contained in:
@ -896,3 +896,55 @@ func (m *mockStreamingProvider) Subscribe(listener auth.CredentialsListener) (au
|
||||
return
|
||||
}, nil
|
||||
}
|
||||
|
||||
var _ = Describe("Client creation", func() {
|
||||
Context("simple client with nil options", func() {
|
||||
It("panics", func() {
|
||||
Expect(func() {
|
||||
redis.NewClient(nil)
|
||||
}).To(Panic())
|
||||
})
|
||||
})
|
||||
Context("cluster client with nil options", func() {
|
||||
It("panics", func() {
|
||||
Expect(func() {
|
||||
redis.NewClusterClient(nil)
|
||||
}).To(Panic())
|
||||
})
|
||||
})
|
||||
Context("ring client with nil options", func() {
|
||||
It("panics", func() {
|
||||
Expect(func() {
|
||||
redis.NewRing(nil)
|
||||
}).To(Panic())
|
||||
})
|
||||
})
|
||||
Context("universal client with nil options", func() {
|
||||
It("panics", func() {
|
||||
Expect(func() {
|
||||
redis.NewUniversalClient(nil)
|
||||
}).To(Panic())
|
||||
})
|
||||
})
|
||||
Context("failover client with nil options", func() {
|
||||
It("panics", func() {
|
||||
Expect(func() {
|
||||
redis.NewFailoverClient(nil)
|
||||
}).To(Panic())
|
||||
})
|
||||
})
|
||||
Context("failover cluster client with nil options", func() {
|
||||
It("panics", func() {
|
||||
Expect(func() {
|
||||
redis.NewFailoverClusterClient(nil)
|
||||
}).To(Panic())
|
||||
})
|
||||
})
|
||||
Context("sentinel client with nil options", func() {
|
||||
It("panics", func() {
|
||||
Expect(func() {
|
||||
redis.NewSentinelClient(nil)
|
||||
}).To(Panic())
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user