Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-12-01 06:16:09 +01:00

Merge pull request '[GITEA] Enable mocked HTTP responses for GitLab migration test (backport to v1.21)' (#2667) from wetneb/forgejo:windows-cloning-v1.21 into v1.21/forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2667
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
oliverpool 2024-03-15 19:19:27 +00:00
commit 0774e04d6b
17 changed files with 1 additions and 1 deletions

View file

@ -32,7 +32,7 @@ func NewMockWebServer(t *testing.T, liveServerBaseURL, testDataDir string, liveM
path := NormalizedFullPath(r.URL)
log.Info("Mock HTTP Server: got request for path %s", r.URL.Path)
// TODO check request method (support POST?)
fixturePath := fmt.Sprintf("%s/%s", testDataDir, strings.ReplaceAll(path, "/", "_"))
fixturePath := fmt.Sprintf("%s/%s", testDataDir, strings.NewReplacer("/", "_", "?", "!").Replace(path))
if liveMode {
liveURL := fmt.Sprintf("%s%s", liveServerBaseURL, path)