aboutsummaryrefslogtreecommitdiffstats
path: root/.eslintrc.yaml
diff options
context:
space:
mode:
authorNanguan Lin <70063547+lng2020@users.noreply.github.com>2023-09-16 11:15:21 +0800
committerGitHub <noreply@github.com>2023-09-16 11:15:21 +0800
commit7cdbe65a2c3ea5a4d958d40428713f6699a22337 (patch)
treeac8ccb707ca328bdc752704f30d7f358c76b3f9b /.eslintrc.yaml
parent684ab403aa89c8df7bcbaef5754f7bed7306c3e1 (diff)
downloadgitea-7cdbe65a2c3ea5a4d958d40428713f6699a22337.tar.gz
gitea-7cdbe65a2c3ea5a4d958d40428713f6699a22337.zip
Add tests for db indexer in indexer_test.go (#27087)
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`
Diffstat (limited to '.eslintrc.yaml')
0 files changed, 0 insertions, 0 deletions