From 6b0b44f6d093432e19c2911ad73a24ae291d6d5b Mon Sep 17 00:00:00 2001 From: HFO4 <912394456@qq.com> Date: Sat, 15 Oct 2022 09:02:28 +0800 Subject: [PATCH] test: fix failed UT --- models/folder.go | 2 +- pkg/aria2/common/common.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/folder.go b/models/folder.go index 16a0a34..ebc1069 100644 --- a/models/folder.go +++ b/models/folder.go @@ -224,7 +224,7 @@ func (folder *Folder) CopyFolderTo(folderID uint, dstFolder *Folder) (size uint6 } else if IDCache, ok := newIDCache[*folder.ParentID]; ok { newID = IDCache } else { - util.Log().Warning("Failed to get parent folder %q", folder.ParentID) + util.Log().Warning("Failed to get parent folder %q", *folder.ParentID) return size, errors.New("Failed to get parent folder") } diff --git a/pkg/aria2/common/common.go b/pkg/aria2/common/common.go index fd32615..ae5e6b0 100644 --- a/pkg/aria2/common/common.go +++ b/pkg/aria2/common/common.go @@ -52,7 +52,7 @@ const ( var ( // ErrNotEnabled 功能未开启错误 - ErrNotEnabled = serializer.NewError(serializer.CodeFeatureNotEnabled, "", nil) + ErrNotEnabled = serializer.NewError(serializer.CodeFeatureNotEnabled, "not enabled", nil) // ErrUserNotFound 未找到下载任务创建者 ErrUserNotFound = serializer.NewError(serializer.CodeUserNotFound, "", nil) )