forked from forgejo/forgejo
Slight performance changes to integrations/git_test.go (#11227)
* switch to use pseudorandom generator and stop cloning in pushcreate Signed-off-by: Andrew Thornton <art27@cantab.net> * Add some logging of BranchProtectPRMerge Signed-off-by: Andrew Thornton <art27@cantab.net> * Stop running prepareTestEnv so often for TestAPIGetBranch Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
0e799c26ba
commit
d26aee3830
2 changed files with 27 additions and 11 deletions
|
@ -14,8 +14,6 @@ import (
|
|||
)
|
||||
|
||||
func testAPIGetBranch(t *testing.T, branchName string, exists bool) {
|
||||
defer prepareTestEnv(t)()
|
||||
|
||||
session := loginUser(t, "user2")
|
||||
token := getTokenForLoggedInUser(t, session)
|
||||
req := NewRequestf(t, "GET", "/api/v1/repos/user2/repo1/branches/%s?token=%s", branchName, token)
|
||||
|
@ -88,6 +86,7 @@ func testAPIDeleteBranch(t *testing.T, branchName string, expectedHTTPStatus int
|
|||
}
|
||||
|
||||
func TestAPIGetBranch(t *testing.T) {
|
||||
defer prepareTestEnv(t)()
|
||||
for _, test := range []struct {
|
||||
BranchName string
|
||||
Exists bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue