mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-28 12:46:09 +01:00
Merge pull request 'Cleanup characters forbidden on Windows from test fixture filenames' (#2178) from wetneb/forgejo:2156-windows-cloning into forgejo-dependency
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2178 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
commit
ab270b3cd7
|
@ -34,7 +34,7 @@ func NewMockWebServer(t *testing.T, liveServerBaseURL, testDataDir string, liveM
|
||||||
path := NormalizedFullPath(r.URL)
|
path := NormalizedFullPath(r.URL)
|
||||||
log.Info("Mock HTTP Server: got request for path %s", r.URL.Path)
|
log.Info("Mock HTTP Server: got request for path %s", r.URL.Path)
|
||||||
// TODO check request method (support POST?)
|
// 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 {
|
if liveMode {
|
||||||
liveURL := fmt.Sprintf("%s%s", liveServerBaseURL, path)
|
liveURL := fmt.Sprintf("%s%s", liveServerBaseURL, path)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue