30 lines
615 B
Go
30 lines
615 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestGetConfig(t *testing.T) {
|
||
|
got := `
|
||
|
[g2g]
|
||
|
request_timeout=1200s
|
||
|
threads=4
|
||
|
|
||
|
github_stars_pages="https://api.github.com/users/%s/starred?page=%d"
|
||
|
github_max_per_page=500
|
||
|
github_page_num=3
|
||
|
github_auth_username="user"
|
||
|
github_auth_password="pass"
|
||
|
|
||
|
gitea_username="user"
|
||
|
gitea_dest_username="user_or_org"
|
||
|
gitea_repo_url_tmpl="https://gogs.example.com/api/v1/repos/%s/%s"
|
||
|
gitea_orgs_url_tmpl="https://git.paulbsd.com/api/v1/orgs/%s"
|
||
|
gitea_migrate_url="https://gogs.example.com/api/v1/repos/migrate"
|
||
|
gitea_auth_token="token xxxx"
|
||
|
gitea_mirror=true
|
||
|
`
|
||
|
fmt.Println(got)
|
||
|
}
|