0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2025-01-13 19:48:03 +01:00
gitea/modules
Lunny Xiao c53ad052d8
Refactor the setting to make unit test easier (#22405)
Some bugs caused by less unit tests in fundamental packages. This PR
refactor `setting` package so that create a unit test will be easier
than before.

- All `LoadFromXXX` files has been splited as two functions, one is
`InitProviderFromXXX` and `LoadCommonSettings`. The first functions will
only include the code to create or new a ini file. The second function
will load common settings.
- It also renames all functions in setting from `newXXXService` to
`loadXXXSetting` or `loadXXXFrom` to make the function name less
confusing.
- Move `XORMLog` to `SQLLog` because it's a better name for that.

Maybe we should finally move these `loadXXXSetting` into the `XXXInit`
function? Any idea?

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: delvh <dev.lh@web.de>
2023-02-20 00:12:01 +08:00
..
actions
activitypub
analyze
auth Provide the ability to set password hash algorithm parameters (#22942) 2023-02-19 15:35:20 +08:00
avatar
base
cache Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
charset
container
context Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
csv
doctor Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
emoji
eventsource
generate
git Remember to attach the parent tree when converting TreeEntry() -> Tree() (#22902) 2023-02-14 21:23:04 +00:00
gitgraph Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
graceful
hcaptcha
highlight Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
hostmatcher
html
httpcache
httplib
indexer Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
issue/template
json
lfs escape filename when assemble URL (#22850) 2023-02-12 09:31:14 +08:00
log
markup Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
mcaptcha
metrics
migration Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
mirror
nosql
notification
options
packages
paginator
pprof
private
process
proxy Use proxy for pull mirror (#22771) 2023-02-11 08:39:50 +08:00
proxyprotocol
public
queue
recaptcha
references
regexplru
repository Rename repo.GetOwner to repo.LoadOwner (#22967) 2023-02-18 20:11:03 +08:00
secret
session
setting Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
sitemap
ssh
storage
structs Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
svg
sync
system
templates Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
test Rename repo.GetOwner to repo.LoadOwner (#22967) 2023-02-18 20:11:03 +08:00
timeutil
translation
turnstile
typesniffer
updatechecker
upload
uri
user
util Move IsReadmeFile* from modules/markup/ to modules/util (#22877) 2023-02-13 15:01:09 -05:00
validation
watcher
web
webhook