diff --git a/models/unittest/mock_http.go b/models/unittest/mock_http.go index 746f18ee2f..afdc5bed21 100644 --- a/models/unittest/mock_http.go +++ b/models/unittest/mock_http.go @@ -34,7 +34,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) diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues?page=1&per_page=2&sort=asc&state=all b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues!page=1&per_page=2&sort=asc&state=all similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues?page=1&per_page=2&sort=asc&state=all rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues!page=1&per_page=2&sort=asc&state=all diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_1_award_emoji?page=1&per_page=2 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_1_award_emoji!page=1&per_page=2 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_1_award_emoji?page=1&per_page=2 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_1_award_emoji!page=1&per_page=2 diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_1_award_emoji?page=2&per_page=2 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_1_award_emoji!page=2&per_page=2 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_1_award_emoji?page=2&per_page=2 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_1_award_emoji!page=2&per_page=2 diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji?page=1&per_page=2 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji!page=1&per_page=2 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji?page=1&per_page=2 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji!page=1&per_page=2 diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji?page=2&per_page=2 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji!page=2&per_page=2 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji?page=2&per_page=2 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji!page=2&per_page=2 diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji?page=3&per_page=2 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji!page=3&per_page=2 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji?page=3&per_page=2 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji!page=3&per_page=2 diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji?page=4&per_page=2 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji!page=4&per_page=2 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji?page=4&per_page=2 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_award_emoji!page=4&per_page=2 diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_discussions?page=1&per_page=100 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_discussions!page=1&per_page=100 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_discussions?page=1&per_page=100 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_issues_2_discussions!page=1&per_page=100 diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_labels?page=1&per_page=100 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_labels!page=1&per_page=100 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_labels?page=1&per_page=100 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_labels!page=1&per_page=100 diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests?page=1&per_page=1&view=simple b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests!page=1&per_page=1&view=simple similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests?page=1&per_page=1&view=simple rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests!page=1&per_page=1&view=simple diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji?page=1&per_page=1 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji!page=1&per_page=1 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji?page=1&per_page=1 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji!page=1&per_page=1 diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji?page=2&per_page=1 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji!page=2&per_page=1 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji?page=2&per_page=1 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji!page=2&per_page=1 diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji?page=3&per_page=1 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji!page=3&per_page=1 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji?page=3&per_page=1 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_merge_requests_2_award_emoji!page=3&per_page=1 diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_milestones?page=1&per_page=100&state=all b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_milestones!page=1&per_page=100&state=all similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_milestones?page=1&per_page=100&state=all rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_milestones!page=1&per_page=100&state=all diff --git a/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_releases?page=1&per_page=100 b/services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_releases!page=1&per_page=100 similarity index 100% rename from services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_releases?page=1&per_page=100 rename to services/migrations/testdata/gitlab/full_download/_api_v4_projects_15578026_releases!page=1&per_page=100