Commit Graph

5 Commits

Author SHA1 Message Date
silverwind
099abf5db4 test: reduce fixture setup work in Go tests (#40423)
Reduce the work Go tests spend on fixture setup, without dropping any
test or covered code. Every fixture repository reset listed and stat'ed
both trees, and many packages copied repositories or created a database
they never use.

- List the fixture repository source tree once per process
- Skip the repository copy in DB-only packages and the database in
settings-only packages
- Drop the unused repository copy and git init from migration tests
- Push LFS files last in `TestGitGeneral`, so LFS hooks don't run on
every later git command
- Link the integration test binary without DWARF

Measured locally on macOS, wall and CPU time:

| | Before | After |
|---|---|---|
| Warm fixture repository reset | 127 ms | 63 ms |
| 30 affected unit packages | 13.6 s, 72 s CPU | 10.0 s, 51 s CPU |
| Migration tests | 29.9 s, 19.1 s CPU | 13.7 s, 8.8 s CPU |
| `TestGitGeneral` | 81 s, 69 s CPU | 62 s, 54 s CPU |
| 46 API integration tests | 41.7 s | 39.0 s |
| Integration test binary relink | 8.7 s, 11.6 s CPU | 3.7 s, 5.7 s CPU
|

Assisted-by: Claude Code:claude-opus-5-5
2026-11-20 02:58:39 +00:00
silverwind
8abda62312 test: consolidate Go tests (#39962)
Consolidate all Go tests. Coverage is identical to before. Go tests are
around 5% faster while being 7% smaller. No non-test code is touched.
2026-10-24 13:48:19 +00:00
Giteabot
5e5f5f3116 fix(deps): update go dependencies (#38194)
Update go deps and fix discovered issues

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-06-29 15:10:47 +00:00
Lunny Xiao
61b1a39efe chore: Move import path from code.gitea.io/gitea to gitea.dev (#37873) 2026-05-26 15:49:31 -07:00
Copilot
9b9fb95559 Improve testing init, clean up webhook tests (#37412)
Avoid webhook test fixtures affect other tests (be triggered)

Also fixed more testing problems including path init, global config
pollution & conflict

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2026-04-25 18:55:18 +00:00