forked from forgejo/forgejo
return error when create gitlabdownloader (#12790)
This commit is contained in:
parent
b333aa7db4
commit
0db9043aa7
2 changed files with 10 additions and 25 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue