🌐 AI搜索 & 代理 主页
Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix race
  • Loading branch information
unknwon committed Dec 17, 2023
commit a18290d16639a0ba1a0c234f2aa8850f88b58d25
3 changes: 3 additions & 0 deletions internal/db/users_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) }()
Expand Down