From d26aee38307b84d6e3001fd7e531a0d67a804267 Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 27 Apr 2020 12:20:09 +0100 Subject: Slight performance changes to integrations/git_test.go (#11227) * switch to use pseudorandom generator and stop cloning in pushcreate Signed-off-by: Andrew Thornton * Add some logging of BranchProtectPRMerge Signed-off-by: Andrew Thornton * Stop running prepareTestEnv so often for TestAPIGetBranch Signed-off-by: Andrew Thornton --- integrations/api_branch_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'integrations/api_branch_test.go') diff --git a/integrations/api_branch_test.go b/integrations/api_branch_test.go index 8417ab36c5..acf7525f80 100644 --- a/integrations/api_branch_test.go +++ b/integrations/api_branch_test.go @@ -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 -- cgit v1.2.3