mirror of https://github.com/gogs/gogs.git
gofmt
parent
e4f9251e54
commit
4795575fac
|
@ -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"}
|
||||
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"}
|
||||
|
|
Loading…
Reference in New Issue