release/0.12
Joe Chen 2022-08-08 14:01:52 +08:00
parent e4f9251e54
commit 4795575fac
No known key found for this signature in database
GPG Key ID: 0BDE5280C552FF60
4 changed files with 8 additions and 8 deletions

View File

@ -727,8 +727,8 @@ type MigrateRepoOptions struct {
}
/*
GitHub, GitLab, Gogs: *.wiki.git
BitBucket: *.git/wiki
- GitHub, GitLab, Gogs: *.wiki.git
- BitBucket: *.git/wiki
*/
var commonWikiURLSuffixes = []string{".wiki.git", ".git/wiki"}

View File

@ -49,7 +49,7 @@ func Test_users(t *testing.T) {
}
// TODO: Only local account is tested, tests for external account will be added
// along with addressing https://github.com/gogs/gogs/issues/6115.
// along with addressing https://github.com/gogs/gogs/issues/6115.
func test_users_Authenticate(t *testing.T, db *users) {
password := "pa$$word"
alice, err := db.Create(CreateUserOpts{

View File

@ -197,9 +197,9 @@ func (r *Request) SetTransport(transport http.RoundTripper) *Request {
// example:
//
// func(req *http.Request) (*url.URL, error) {
// u, _ := url.ParseRequestURI("http://127.0.0.1:8118")
// return u, nil
// }
// u, _ := url.ParseRequestURI("http://127.0.0.1:8118")
// return u, nil
// }
func (r *Request) SetProxy(proxy func(*http.Request) (*url.URL, error)) *Request {
r.setting.Proxy = proxy
return r

View File

@ -16,8 +16,8 @@ import (
// It is useful to mock "os/exec" functions in tests. When succeeded, it returns
// the result produced by the test helper.
// The test helper should:
// 1. Use WantHelperProcess function to determine if it is being called in helper mode.
// 2. Call fmt.Fprintln(os.Stdout, ...) to print results for the main test to collect.
// 1. Use WantHelperProcess function to determine if it is being called in helper mode.
// 2. Call fmt.Fprintln(os.Stdout, ...) to print results for the main test to collect.
func Exec(helper string, envs ...string) (string, error) {
cmd := exec.Command(os.Args[0], "-test.run="+helper, "--")
cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"}