From a19447aed128ecadfcd938d6a80cd4951af1f4ce Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 25 Dec 2020 09:59:32 +0000 Subject: migrate from com.* to alternatives (#14103) * remove github.com/unknwon/com from models * dont use "com.ToStr()" * replace "com.ToStr" with "fmt.Sprint" where its easy to do * more refactor * fix test * just "proxy" Copy func for now * as per @lunny --- services/archiver/archiver_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'services/archiver') diff --git a/services/archiver/archiver_test.go b/services/archiver/archiver_test.go index 8a0f73bf9c..84bab14818 100644 --- a/services/archiver/archiver_test.go +++ b/services/archiver/archiver_test.go @@ -12,9 +12,9 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/test" + "code.gitea.io/gitea/modules/util" "github.com/stretchr/testify/assert" - "github.com/unknwon/com" ) var queueMutex sync.Mutex @@ -144,7 +144,9 @@ func TestArchive_Basic(t *testing.T) { for _, req := range inFlight { assert.True(t, req.IsComplete()) - assert.True(t, com.IsExist(req.GetArchivePath())) + exist, err := util.IsExist(req.GetArchivePath()) + assert.NoError(t, err) + assert.True(t, exist) } arbitraryReq := inFlight[0] -- cgit v1.2.3