diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-05-23 09:29:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-23 09:29:15 +0800 |
commit | abcf5a7b5e2c3df951b8048317a99a89b040b489 (patch) | |
tree | 46f089aec1c83dfa45e7e9ff18cbe4e508306cbb /cmd/web.go | |
parent | 5c0745c0349f0709d0fc36fd8a97dcab86bce28a (diff) | |
download | gitea-abcf5a7b5e2c3df951b8048317a99a89b040b489.tar.gz gitea-abcf5a7b5e2c3df951b8048317a99a89b040b489.zip |
Fix install page context, make the install page tests really test (#24858)
Fix #24856
Rename "context.contextKey" to "context.WebContextKey", this context is
for web context only. But the Context itself is not renamed, otherwise
it would cause a lot of changes (if we really want to rename it, there
could be a separate PR).
The old test code doesn't really test, the "install page" gets broken
not only one time, so use new test code to make sure the "install page"
could work.
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd/web.go b/cmd/web.go index bc344db540..da6c987ff8 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -142,10 +142,8 @@ func runWeb(ctx *cli.Context) error { return err } } - installCtx, cancel := context.WithCancel(graceful.GetManager().HammerContext()) - c := install.Routes(installCtx) + c := install.Routes() err := listen(c, false) - cancel() if err != nil { log.Critical("Unable to open listener for installer. Is Gitea already running?") graceful.GetManager().DoGracefulShutdown() |