aboutsummaryrefslogtreecommitdiffstats
path: root/modules/migrations/github_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-09-02 18:49:25 +0100
committerGitHub <noreply@github.com>2020-09-02 13:49:25 -0400
commit714ab71ddc4260937b1480519d453d2dc4e77dd6 (patch)
treed9fafe938f423afd2cce7d6a2bcab14276e8b61a /modules/migrations/github_test.go
parent84eac6ed6c1b02a28c83cd2695aa470c4acf46e9 (diff)
downloadgitea-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/github_test.go')
-rw-r--r--modules/migrations/github_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/migrations/github_test.go b/modules/migrations/github_test.go
index 0b8c559d30..660e82d645 100644
--- a/modules/migrations/github_test.go
+++ b/modules/migrations/github_test.go
@@ -6,6 +6,7 @@
package migrations
import (
+ "context"
"os"
"testing"
"time"
@@ -64,7 +65,7 @@ func assertLabelEqual(t *testing.T, name, color, description string, label *base
func TestGitHubDownloadRepo(t *testing.T) {
GithubLimitRateRemaining = 3 //Wait at 3 remaining since we could have 3 CI in //
- downloader := NewGithubDownloaderV3("", "", os.Getenv("GITHUB_READ_TOKEN"), "go-gitea", "test_repo")
+ downloader := NewGithubDownloaderV3(context.Background(), "", "", os.Getenv("GITHUB_READ_TOKEN"), "go-gitea", "test_repo")
err := downloader.RefreshRate()
assert.NoError(t, err)