gitea/modules
Nanguan Lin 7cdbe65a2c
Add tests for db indexer in indexer_test.go ()
As described in the title.
Some points: 
1. Why need those tests?
Because `buildIssueOverview` is not well tested, there are several
continuous bugs in the issue overview webpage.
2. Why in indexer_test.go?
It's hard to put those tests in `./modules/indexer/issue/db/db_test.go`
because those tests need 'real' data in db mocked by fixtures instead of
random data in `./modules/indexer/issue/internal/tests`. When using
'real' data(`unittest.PrepareTestDatabase`), `InitIssueIndexer` and the
package `init()` function of `indexer` are required to init indexer.
3. Why only db?
The other three indexer engines are well tested by random data and it's
okay to also test them with 'real' data in db mocked by fixtures. Any
follow-up PR is welcome.
4. Those tests are really basic, any more complicated tests are welcome.
5. I think it's also necessary to add tests in `TestAPISearchIssues`
in`api_test_issue.go` and `TestIssues` in `home_test.go`
2023-09-16 11:15:21 +08:00
..
actions chore(actions): support cron schedule task () 2023-08-24 03:06:51 +00:00
activitypub More refactoring of `db.DefaultContext` () 2023-09-15 06:13:19 +00:00
analyze Rename code_langauge.go to code_language.go () 2023-08-07 15:00:53 -04:00
assetfs Use `Set[Type]` instead of `map[Type]bool/struct{}`. () 2023-08-30 06:55:25 +00:00
auth
avatar
base Replace `interface{}` with `any` () 2023-07-04 18:36:08 +00:00
cache
charset Replace `interface{}` with `any` () 2023-07-04 18:36:08 +00:00
container Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
context More refactoring of `db.DefaultContext` () 2023-09-15 06:13:19 +00:00
contexttest Avoid double-unescaping of form value () 2023-09-01 12:01:36 +00:00
csv
doctor Reduce usage of `db.DefaultContext` () 2023-09-14 17:09:32 +00:00
emoji
eventsource
generate Handle base64 decoding correctly to avoid panic () 2023-08-14 10:30:16 +00:00
git Clarify the git command Stdin hanging problem () 2023-09-08 13:20:38 +00:00
gitgraph
graceful Allow the use of alternative net.Listener implementations by downstreams () 2023-07-24 07:18:17 +00:00
hcaptcha
highlight
hostmatcher
html
httpcache
httplib Less naked returns () 2023-07-07 05:31:56 +00:00
indexer Add tests for db indexer in indexer_test.go () 2023-09-16 11:15:21 +08:00
issue/template Replace `interface{}` with `any` () 2023-07-04 18:36:08 +00:00
json
label
lfs Rewrite logger system () 2023-05-21 22:35:11 +00:00
log Reduce some allocations in type conversion () 2023-08-29 00:43:16 +08:00
markup fix media description render for orgmode () 2023-09-13 05:44:59 +00:00
mcaptcha
metrics Reduce usage of `db.DefaultContext` () 2023-09-14 17:09:32 +00:00
migration Replace `interface{}` with `any` () 2023-07-04 18:36:08 +00:00
nosql Update tool dependencies, lock govulncheck and actionlint () 2023-07-09 11:58:06 +00:00
options
packages Use docs.gitea.com instead of docs.gitea.io () 2023-08-27 11:59:12 +00:00
paginator
pprof
private Replace `interface{}` with `any` () 2023-07-04 18:36:08 +00:00
process
proxy
proxyprotocol
public Serve pre-defined files in "public", add "security.txt", add CORS header for ".well-known" () 2023-07-21 12:14:20 +00:00
queue Expanding documentation in queue.go () 2023-09-08 05:22:43 +00:00
recaptcha
references Replace 'userxx' with 'orgxx' in all test files when the user type is org () 2023-09-14 02:59:53 +00:00
regexplru Upgrade go dependencies () 2023-07-14 11:00:31 +08:00
repository Reduce usage of `db.DefaultContext` () 2023-09-14 17:09:32 +00:00
secret
session
setting Actions are no longer experimental, so enable them by default () 2023-09-15 06:43:39 +00:00
sitemap
ssh restrict certificate type for builtin SSH server () 2023-09-01 13:45:22 +00:00
storage Fix object storage path handling () 2023-09-13 01:18:52 +00:00
structs refactor(API): refactor secret creation and update functionality () 2023-08-28 13:08:19 +08:00
svg
sync
system Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
templates Replace `util.SliceXxx` with `slices.Xxx` () 2023-09-07 09:37:47 +00:00
test Move web/api context related testing function into a separate package () 2023-09-01 11:26:07 +00:00
testlogger
timeutil Fix incorrect webhook time and use relative-time to display it () 2023-05-03 19:53:43 -04:00
translation
turnstile
typesniffer Detect ogg mime-type as audio or video () 2023-08-15 10:31:25 +08:00
updatechecker
upload
uri
user
util Replace `util.SliceXxx` with `slices.Xxx` () 2023-09-07 09:37:47 +00:00
validation Check blocklist for emails when adding them to account () 2023-08-30 10:46:49 -05:00
web Update tool dependencies () 2023-08-20 22:59:19 +00:00
webhook