mirror of
https://github.com/gogs/gogs.git
synced 2025-05-31 11:42:13 +00:00
fix race
This commit is contained in:
parent
b332af5653
commit
a18290d166
@ -440,6 +440,9 @@ func usersDeleteCustomAvatar(t *testing.T, ctx context.Context, db *users) {
|
||||
avatar, err := public.Files.ReadFile("img/avatar_default.png")
|
||||
require.NoError(t, err)
|
||||
|
||||
tempPictureAvatarUploadPath := filepath.Join(os.TempDir(), "orgsList-tempPictureAvatarUploadPath")
|
||||
conf.SetMockPicture(t, conf.PictureOpts{AvatarUploadPath: tempPictureAvatarUploadPath})
|
||||
|
||||
avatarPath := userutil.CustomAvatarPath(alice.ID)
|
||||
_ = os.Remove(avatarPath)
|
||||
defer func() { _ = os.Remove(avatarPath) }()
|
||||
|
Loading…
x
Reference in New Issue
Block a user