forked from forgejo/forgejo
[TESTS] testMiddlewareHook, dependency injection in integration tests
(cherry picked from commit 6623630d10
)
This commit is contained in:
parent
ae57e1b6d7
commit
d30b9dc5b4
6 changed files with 28 additions and 19 deletions
|
@ -12,7 +12,6 @@ import (
|
|||
|
||||
"code.gitea.io/gitea/modules/json"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/routers"
|
||||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"gitea.com/go-chi/session"
|
||||
|
@ -56,7 +55,7 @@ func TestSessionFileCreation(t *testing.T) {
|
|||
oldSessionConfig := setting.SessionConfig.ProviderConfig
|
||||
defer func() {
|
||||
setting.SessionConfig.ProviderConfig = oldSessionConfig
|
||||
c = routers.NormalRoutes()
|
||||
setNormalRoutes()
|
||||
}()
|
||||
|
||||
var config session.Options
|
||||
|
@ -75,7 +74,7 @@ func TestSessionFileCreation(t *testing.T) {
|
|||
|
||||
setting.SessionConfig.ProviderConfig = string(newConfigBytes)
|
||||
|
||||
c = routers.NormalRoutes()
|
||||
setNormalRoutes()
|
||||
|
||||
t.Run("NoSessionOnViewIssue", func(t *testing.T) {
|
||||
defer tests.PrintCurrentTest(t)()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue