diff options
author | zeripath <art27@cantab.net> | 2020-09-02 18:49:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-02 13:49:25 -0400 |
commit | 714ab71ddc4260937b1480519d453d2dc4e77dd6 (patch) | |
tree | d9fafe938f423afd2cce7d6a2bcab14276e8b61a /modules/migrations/gitlab_test.go | |
parent | 84eac6ed6c1b02a28c83cd2695aa470c4acf46e9 (diff) | |
download | gitea-714ab71ddc4260937b1480519d453d2dc4e77dd6.tar.gz gitea-714ab71ddc4260937b1480519d453d2dc4e77dd6.zip |
Ensure that all migration requests are cancellable (#12669)
* Ensure that all migration requests are cancellable
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Use WithContext as RequestWithContext is go 1.14
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/migrations/gitlab_test.go')
-rw-r--r-- | modules/migrations/gitlab_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/migrations/gitlab_test.go b/modules/migrations/gitlab_test.go index daf05f8e3a..1862d67cc1 100644 --- a/modules/migrations/gitlab_test.go +++ b/modules/migrations/gitlab_test.go @@ -5,6 +5,7 @@ package migrations import ( + "context" "net/http" "os" "testing" @@ -27,7 +28,7 @@ func TestGitlabDownloadRepo(t *testing.T) { t.Skipf("Can't access test repo, skipping %s", t.Name()) } - downloader := NewGitlabDownloader("https://gitlab.com", "gitea/test_repo", "", "", gitlabPersonalAccessToken) + downloader := NewGitlabDownloader(context.Background(), "https://gitlab.com", "gitea/test_repo", "", "", gitlabPersonalAccessToken) if downloader == nil { t.Fatal("NewGitlabDownloader is nil") } |