diff options
author | zeripath <art27@cantab.net> | 2019-11-25 23:21:37 +0000 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-11-26 01:21:37 +0200 |
commit | 055f6d229672524e3933940f95aa28939d94961a (patch) | |
tree | 72d1d427ce694517b70b6b751e35fdf6d5874428 /integrations/issue_test.go | |
parent | f5bd0884d2adea8ef7ba1bbd9dacb240d7c6b0f7 (diff) | |
download | gitea-055f6d229672524e3933940f95aa28939d94961a.tar.gz gitea-055f6d229672524e3933940f95aa28939d94961a.zip |
Fix "data race" in testlogger (#9159)
* Fix data race in testlogger
* Update git_helper_for_declarative_test.go
Diffstat (limited to 'integrations/issue_test.go')
-rw-r--r-- | integrations/issue_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/integrations/issue_test.go b/integrations/issue_test.go index aa17c44254..5a4b75b751 100644 --- a/integrations/issue_test.go +++ b/integrations/issue_test.go @@ -49,14 +49,14 @@ func assertMatch(t testing.TB, issue *models.Issue, keyword string) { } func TestNoLoginViewIssues(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() req := NewRequest(t, "GET", "/user2/repo1/issues") MakeRequest(t, req, http.StatusOK) } func TestViewIssuesSortByType(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() user := models.AssertExistsAndLoadBean(t, &models.User{ID: 1}).(*models.User) repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) @@ -84,7 +84,7 @@ func TestViewIssuesSortByType(t *testing.T) { } func TestViewIssuesKeyword(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) @@ -104,7 +104,7 @@ func TestViewIssuesKeyword(t *testing.T) { } func TestNoLoginViewIssue(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() req := NewRequest(t, "GET", "/user2/repo1/issues/1") MakeRequest(t, req, http.StatusOK) @@ -173,13 +173,13 @@ func testIssueAddComment(t *testing.T, session *TestSession, issueURL, content, } func TestNewIssue(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() session := loginUser(t, "user2") testNewIssue(t, session, "user2", "repo1", "Title", "Description") } func TestIssueCommentClose(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() session := loginUser(t, "user2") issueURL := testNewIssue(t, session, "user2", "repo1", "Title", "Description") testIssueAddComment(t, session, issueURL, "Test comment 1", "") @@ -195,7 +195,7 @@ func TestIssueCommentClose(t *testing.T) { } func TestIssueCrossReference(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() // Issue that will be referenced _, issueBase := testIssueWithBean(t, "user2", 1, "Title", "Description") |