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":51,"name":"1.1.0"}]
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
[]
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
[{"id":1001,"date":"2021-08-09T22:56:31.128Z","userId":336,"content":"it has a comment\n\nEDIT: that got edited"}]
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
[]
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
[{"id":398,"number":4,"state":"Open","title":"Hi there","description":"an issue not assigned to a milestone","submitterId":336,"submitDate":"2021-08-09T22:56:16.734Z","fields":[{"name":"Type","value":"Improvement"}]},{"id":397,"number":3,"state":"Open","title":"Add an awesome feature","description":"just another issue to test against","submitterId":336,"submitDate":"2021-08-09T22:55:49.878Z","fields":[{"name":"Type","value":"New Feature"}]}]
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
[{"id":50,"name":"1.0.0","description":"","dueDay":18751,"closed":true},{"id":51,"name":"1.1.0","description":"next things?","dueDay":0,"closed":false}]
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
[]
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
[{"id":149,"name":"go-gitea-test_repo","path":"/go-gitea-test_repo","description":"Test repository for testing migration from OneDev to gitea"}]
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
{"targetHeadCommitHash":"f32b0a9dfd09a60f616f29158f772cedd89942d2","headCommitHash":"343deffe3526b9bc84e873743ff7f6e6d8b827c0","mergeStrategy":"MERGE_IF_NECESSARY","mergeCommitHash":"abc123"}
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
[{"id":2001,"userId":317,"status":"PENDING"}]
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
[{"id":186,"number":1,"title":"Pull to add a new file","description":"just do some git stuff","submitterId":336,"submitDate":"2021-08-09T23:01:16.025Z","targetBranch":"master","sourceBranch":"branch-for-a-pull","baseCommitHash":"f32b0a9dfd09a60f616f29158f772cedd89942d2","status":"OPEN"}]
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
{"name":"User 317"}
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
[]
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
{"name":"User 336"}
@@ -0,0 +1,3 @@
Content-Type: application/json;charset=utf-8
[]
@@ -0,0 +1,3 @@
Content-Type: text/plain;charset=utf-8
12.0.1