Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Jul 7, 2019
1 parent 3fb90c1 commit e6a0faa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions modules/session/virtual.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ func (o *VirtualSessionProvider) GC() {
o.provider.GC()
}

func init() {
session.Register("VirtualSession", &VirtualSessionProvider{})
}

// VirtualStore represents a virtual session store implementation.
type VirtualStore struct {
p *VirtualSessionProvider
Expand Down
3 changes: 1 addition & 2 deletions routers/routes/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"code.gitea.io/gitea/modules/metrics"
"code.gitea.io/gitea/modules/options"
"code.gitea.io/gitea/modules/public"
session_service "code.gitea.io/gitea/modules/session"
_ "code.gitea.io/gitea/modules/session"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/templates"
"code.gitea.io/gitea/modules/validation"
Expand Down Expand Up @@ -197,7 +197,6 @@ func NewMacaron() *macaron.Macaron {
m.Use(captcha.Captchaer(captcha.Options{
SubURL: setting.AppSubURL,
}))
session.Register("VirtualSession", &session_service.VirtualSessionProvider{})
m.Use(session.Sessioner(setting.SessionConfig))
m.Use(csrf.Csrfer(csrf.Options{
Secret: setting.SecretKey,
Expand Down

0 comments on commit e6a0faa

Please sign in to comment.