diff options
author | zeripath <art27@cantab.net> | 2021-08-27 14:00:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 15:00:37 +0200 |
commit | cd8db3a83d3e2e0e0ae299ec94aabc91a7cc0cdd (patch) | |
tree | 7ec784ae7a3b8cce80a69fa8e4076c47749b8963 | |
parent | e37342db0c102ef12ae70072d9f4bbef89338085 (diff) | |
download | gitea-cd8db3a83d3e2e0e0ae299ec94aabc91a7cc0cdd.tar.gz gitea-cd8db3a83d3e2e0e0ae299ec94aabc91a7cc0cdd.zip |
Prevent "Race" detected in TestAdmin*User (#16830)
These tests are missing the defer prefix.
Related #1441
Signed-off-by: Andrew Thornton <art27@cantab.net>
-rw-r--r-- | integrations/admin_user_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/integrations/admin_user_test.go b/integrations/admin_user_test.go index f6b4590d27..96233436e8 100644 --- a/integrations/admin_user_test.go +++ b/integrations/admin_user_test.go @@ -15,7 +15,7 @@ import ( ) func TestAdminViewUsers(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() session := loginUser(t, "user1") req := NewRequest(t, "GET", "/admin/users") @@ -27,7 +27,7 @@ func TestAdminViewUsers(t *testing.T) { } func TestAdminViewUser(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() session := loginUser(t, "user1") req := NewRequest(t, "GET", "/admin/users/1") @@ -39,7 +39,7 @@ func TestAdminViewUser(t *testing.T) { } func TestAdminEditUser(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() testSuccessfullEdit(t, models.User{ID: 2, Name: "newusername", LoginName: "otherlogin", Email: "new@e-mail.gitea"}) } |