1
0
Fork 0
forked from forgejo/forgejo

return error when create gitlabdownloader (#12790)

This commit is contained in:
Lunny Xiao 2020-09-10 16:27:49 +08:00 committed by GitHub
parent b333aa7db4
commit 0db9043aa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 25 deletions

View file

@ -6,6 +6,7 @@ package migrations
import (
"context"
"fmt"
"net/http"
"os"
"testing"
@ -28,9 +29,9 @@ func TestGitlabDownloadRepo(t *testing.T) {
t.Skipf("Can't access test repo, skipping %s", t.Name())
}
downloader := NewGitlabDownloader(context.Background(), "https://gitlab.com", "gitea/test_repo", "", "", gitlabPersonalAccessToken)
if downloader == nil {
t.Fatal("NewGitlabDownloader is nil")
downloader, err := NewGitlabDownloader(context.Background(), "https://gitlab.com", "gitea/test_repo", "", "", gitlabPersonalAccessToken)
if err != nil {
t.Fatal(fmt.Sprintf("NewGitlabDownloader is nil: %v", err))
}
repo, err := downloader.GetRepoInfo()
assert.NoError(t, err)