Stop miniredis after each test
This commit is contained in:
parent
bc3d75a2ed
commit
7e7bfb5daf
@ -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