forgejo/services/migrations
Antonin Delpeuch f0746e648d
[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)
2023-12-18 16:39:20 +01:00
..
testdata/gitlab/full_download [GITEA] Enable mocked HTTP responses for GitLab migration test 2023-12-18 16:39:20 +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 Update github.com/google/go-github to v53 (#25157) 2023-06-09 19:42:51 +00:00
git.go
gitbucket.go
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 2023-12-18 16:39:19 +01:00
gitea_uploader_test.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
github.go Fix panic when migrating a repo from GitHub with issues (#25246) 2023-06-14 14:12:39 +08:00
github_test.go
gitlab.go Fix DownloadFunc when migrating releases (#27887) 2023-11-03 15:56:53 +08:00
gitlab_test.go [GITEA] Enable mocked HTTP responses for GitLab migration test 2023-12-18 16:39:20 +01:00
gogs.go
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