aboutsummaryrefslogtreecommitdiffstats
path: root/services/archiver
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-12-25 09:59:32 +0000
committerGitHub <noreply@github.com>2020-12-25 11:59:32 +0200
commita19447aed128ecadfcd938d6a80cd4951af1f4ce (patch)
tree6312bf946d601aab29731645a4777feeaea66036 /services/archiver
parent04ae0f2f3f4556c6d0b4adc5f2cffd0cc7d25151 (diff)
downloadgitea-a19447aed128ecadfcd938d6a80cd4951af1f4ce.tar.gz
gitea-a19447aed128ecadfcd938d6a80cd4951af1f4ce.zip
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
Diffstat (limited to 'services/archiver')
-rw-r--r--services/archiver/archiver_test.go6
1 files changed, 4 insertions, 2 deletions
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]