Enable mocked HTTP responses for GitLab migration test

This commit is contained in:
Antonin Delpeuch 2023-11-28 13:50:26 +01:00
parent 52053b1389
commit 19cefc4de2
22 changed files with 595 additions and 1 deletions

View file

@ -27,7 +27,7 @@ func TestGitlabDownloadRepo(t *testing.T) {
// If no access token is available, those cached responses will be used instead.
gitlabPersonalAccessToken := os.Getenv("GITLAB_READ_TOKEN")
fixturePath := "./testdata/gitlab/full_download"
server := unittest.NewMockWebServer(t, "https://gitlab.com", fixturePath, true)
server := unittest.NewMockWebServer(t, "https://gitlab.com", fixturePath, gitlabPersonalAccessToken != "")
defer server.Close()
downloader, err := NewGitlabDownloader(context.Background(), server.URL, "gitea/test_repo", "", "", gitlabPersonalAccessToken)