jojo/tests
forgejo-backport-action a2f9fb501f [v14.0/forgejo] fix: remove template file from generated repo (#11722)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/11691

This PR fixes a bug where the previously-implemented functionality to delete the `.gitea/template` or `.forgejo/template` file when generating a repository from a template was not working. The issue happened because the code was using `util.Remove()` with a relative path, but this resolves against the process working directory instead of the temporary clone directory. The fix was to use `root.Remove()` which is based on an `os.OpenRoot()` anchored at `tmpDir`.

Updated integration tests and verified that they pass with this change and fail without it.

Co-authored-by: Brandon Rothweiler <bdr9@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11722
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2026-03-18 21:11:52 +01:00
..
e2e [v14.0/forgejo] fix: Forgejo Security Patches, 2026-03-09 (#11514) 2026-03-09 06:35:39 +01:00
fuzz chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
gitea-lfs-meta Test views of LFS files (#22196) 2022-12-23 07:41:56 +08:00
gitea-repositories-meta fix: Allow SHA-256 in PR commit URLs (#10309) 2025-12-16 00:45:00 +01:00
integration [v14.0/forgejo] fix: remove template file from generated repo (#11722) 2026-03-18 21:11:52 +01:00
testdata/data add model viewer for .glb (GLTF) model in file view (#8111) 2025-06-21 14:42:35 +02:00
mysql.ini.tmpl fix: reduce deadlocks merging PRs by using caching for repo issue count stats (#9922) 2025-10-31 23:50:05 +01:00
pgsql.ini.tmpl fix: reduce deadlocks merging PRs by using caching for repo issue count stats (#9922) 2025-10-31 23:50:05 +01:00
sqlite.ini.tmpl fix: reduce deadlocks merging PRs by using caching for repo issue count stats (#9922) 2025-10-31 23:50:05 +01:00
test_utils.go [v14.0/forgejo] fix: prevent intermittent test failures caused by uncancellable tasks (#10717) 2026-01-06 17:06:22 +01:00