Stop miniredis after each test
This commit is contained in:
parent
bf72731bcb
commit
a9e2d1bfa7
@ -306,15 +306,19 @@ var _ = Describe("NewSessionStore", func() {
|
||||
})
|
||||
|
||||
Context("with type 'redis'", func() {
|
||||
var mr *miniredis.Miniredis
|
||||
BeforeEach(func() {
|
||||
mr, err := miniredis.Run()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
var err error
|
||||
mr, err = miniredis.Run()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
opts.Type = options.RedisSessionStoreType
|
||||
opts.RedisConnectionURL = "redis://" + mr.Addr()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
mr.Close()
|
||||
})
|
||||
|
||||
It("creates a redis.SessionStore", func() {
|
||||
ss, err := sessions.NewSessionStore(opts, cookieOpts)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
Loading…
Reference in New Issue
Block a user