mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-18 04:15:15 +00:00
* Use server-host as source for public links * use config and rm GetURL() * fix: solve import cycle Co-authored-by: 6543 <6543@obermui.de>
25 lines
603 B
Go
25 lines
603 B
Go
package server_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/woodpecker-ci/woodpecker/model"
|
|
"github.com/woodpecker-ci/woodpecker/remote/github"
|
|
"github.com/woodpecker-ci/woodpecker/server"
|
|
)
|
|
|
|
func TestFetchGithub(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
github, err := github.New(github.Opts{URL: "https://github.com"})
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
configFetcher := server.NewConfigFetcher(
|
|
github,
|
|
&model.User{Token: "xxx"},
|
|
&model.Repo{Owner: "laszlocph", Name: "drone-multipipeline", Config: ".drone"},
|
|
&model.Build{Commit: "89ab7b2d6bfb347144ac7c557e638ab402848fee"},
|
|
)
|
|
configFetcher.Fetch()
|
|
}
|