Remove external service dependencies in migration tests (#36866)

Fix #36859

Replace live third-party API calls in migration tests with a
fixture-based HTTP mock server. Fixtures are committed so tests run
offline by default; live recording is gated per service on an API-token
env var.

Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
This commit is contained in:
silverwind
2026-04-23 17:18:53 +02:00
committed by GitHub
parent 12d83cbfa3
commit 7947851e57
176 changed files with 2446 additions and 160 deletions
@@ -0,0 +1,3 @@
Content-Type: application/json; charset=UTF-8
{"id":1,"owner":{"id":5331,"login":"lunny","full_name":"","email":"xiaolunwen@gmail.com","avatar_url":"https://try.gogs.io/avatars/5331"},"name":"TESTREPO","full_name":"lunnytest/TESTREPO","description":"","private":false,"fork":false,"parent":null,"empty":false,"mirror":false,"size":0,"html_url":"https://try.gogs.io/lunnytest/TESTREPO","ssh_url":"git@try.gogs.io:lunnytest/TESTREPO.git","clone_url":"https://try.gogs.io/lunnytest/TESTREPO.git","website":"","stars_count":0,"forks_count":0,"watchers_count":1,"open_issues_count":1,"default_branch":"master","created_at":"2019-06-11T08:15:00Z","updated_at":"2019-06-11T08:15:00Z","permissions":{"admin":false,"push":false,"pull":true}}
@@ -0,0 +1,3 @@
Content-Type: application/json; charset=UTF-8
[{"id":1,"user":{"id":5331,"login":"lunny","full_name":"","email":"xiaolunwen@gmail.com","avatar_url":"https://try.gogs.io/avatars/5331"},"body":"1111","created_at":"2019-06-11T08:19:50Z","updated_at":"2019-06-11T08:19:50Z"},{"id":2,"user":{"id":15822,"login":"clacplouf","full_name":"","email":"test1234@dbn.re","avatar_url":"https://try.gogs.io/avatars/15822"},"body":"88888888","created_at":"2019-10-26T11:07:02Z","updated_at":"2019-10-26T11:07:02Z"}]
@@ -0,0 +1,3 @@
Content-Type: application/json; charset=UTF-8
[{"id":1,"number":1,"user":{"id":5331,"login":"lunny","full_name":"","email":"xiaolunwen@gmail.com","avatar_url":"https://try.gogs.io/avatars/5331"},"title":"test","body":"test","labels":[{"id":1,"name":"bug","color":"ee0701"}],"milestone":null,"assignee":null,"state":"open","comments":2,"created_at":"2019-06-11T08:16:44Z","updated_at":"2019-10-26T11:07:02Z","pull_request":null}]
@@ -0,0 +1,3 @@
Content-Type: application/json; charset=UTF-8
[{"id":1,"name":"bug","color":"ee0701"},{"id":2,"name":"duplicate","color":"cccccc"},{"id":3,"name":"enhancement","color":"84b6eb"},{"id":4,"name":"help wanted","color":"128a0c"},{"id":5,"name":"invalid","color":"e6e6e6"},{"id":6,"name":"question","color":"cc317c"},{"id":7,"name":"wontfix","color":"ffffff"}]
@@ -0,0 +1,3 @@
Content-Type: application/json; charset=UTF-8
[{"id":1,"title":"1.0","description":"","state":"open","open_issues":1,"closed_issues":0,"closed_at":null,"due_on":null}]