forgejo/services/migrations
Antonin Delpeuch 65060c6961
[GITEA] Enable mocked HTTP responses for GitLab migration test
Fix gitlab migration unit test

Closes #1837.

The differences in dates can be explained by commit e19b9653ea, which
changed the order in which "created_date" and "updated_date" are
considered.

(cherry picked from commit b0bba20aa4)

Mock HTTP requests in GitLab migration test

This introduces a new utility which can be added to other tests
making HTTP calls to a live service, to cache the responses of this
service in the repository.

(cherry picked from commit 52053b1389)

Enable mocked HTTP responses for GitLab migration test

(cherry picked from commit 19cefc4de2)

Simplify HTTP mocking utility in unit tests

Follow-up to https://codeberg.org/forgejo/forgejo/pulls/1841

(cherry picked from commit ca517c8bb4)
(cherry picked from commit b227e0dd6b)
(cherry picked from commit 6cc9d06556)
(cherry picked from commit f0746e648d)
(cherry picked from commit 414193341b)
(cherry picked from commit 6e93df3bbb)
(cherry picked from commit db0dbab552)
(cherry picked from commit 8f9c9c63fb)

(cherry picked from commit e74e262030)
(cherry picked from commit 2e0933edcf)
2024-01-28 10:54:58 +01:00
..
testdata/gitlab/full_download [GITEA] Enable mocked HTTP responses for GitLab migration test 2024-01-28 10:54:58 +01:00
codebase.go Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
codebase_test.go
common.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
dump.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
error.go Bump google/go-github to v57 (#28514) 2023-12-18 15:42:04 -06:00
git.go
gitbucket.go Rewrite logger system (#24726) 2023-05-21 22:35:11 +00:00
gitea_downloader.go Fix DownloadFunc when migrating releases (#27887) 2023-11-03 15:56:53 +08:00
gitea_downloader_test.go
gitea_uploader.go [GITEA] Skip unsupported code comment 2024-01-28 10:48:05 +01:00
gitea_uploader_test.go Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
github.go Bump google/go-github to v57 (#28514) 2023-12-18 15:42:04 -06:00
github_test.go
gitlab.go Use known issue IID to generate new PR index number when migrating from GitLab (#28616) 2023-12-26 17:57:25 +00:00
gitlab_test.go [GITEA] Enable mocked HTTP responses for GitLab migration test 2024-01-28 10:54:58 +01:00
gogs.go Rewrite logger system (#24726) 2023-05-21 22:35:11 +00:00
gogs_test.go
http_client.go
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
migrate.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
migrate_test.go
onedev.go Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
onedev_test.go
restore.go
update.go Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00