aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/integration_test.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-04-02 00:34:57 +0800
committerGitHub <noreply@github.com>2022-04-02 00:34:57 +0800
commit4f27c289472a4cfafb5a9b0e38e6a3413c30c562 (patch)
tree4a9388cfaf2efe4e9d0ed0242736769ef7e3e083 /integrations/integration_test.go
parent4c5cb1e2f2c7a1fcc3b151192bd45bd1bbc090bd (diff)
downloadgitea-4f27c289472a4cfafb5a9b0e38e6a3413c30c562.tar.gz
gitea-4f27c289472a4cfafb5a9b0e38e6a3413c30c562.zip
Remove legacy `unknwon/com` package (#19298)
Follows: #19284 * The `CopyDir` is only used inside test code * Rewrite `ToSnakeCase` with more test cases * The `RedisCacher` only put strings into cache, here we use internal `toStr` to replace the legacy `ToStr` * The `UniqueQueue` can use string as ID directly, no need to call `ToStr`
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r--integrations/integration_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go
index c778fb8013..9e0445cae7 100644
--- a/integrations/integration_test.go
+++ b/integrations/integration_test.go
@@ -254,7 +254,7 @@ func prepareTestEnv(t testing.TB, skip ...int) func() {
assert.NoError(t, unittest.LoadFixtures())
assert.NoError(t, util.RemoveAll(setting.RepoRootPath))
- assert.NoError(t, util.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath))
+ assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath))
ownerDirs, err := os.ReadDir(setting.RepoRootPath)
if err != nil {
assert.NoError(t, err, "unable to read the new repo root: %v\n", err)
@@ -550,7 +550,7 @@ func resetFixtures(t *testing.T) {
assert.NoError(t, queue.GetManager().FlushAll(context.Background(), -1))
assert.NoError(t, unittest.LoadFixtures())
assert.NoError(t, util.RemoveAll(setting.RepoRootPath))
- assert.NoError(t, util.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath))
+ assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath))
ownerDirs, err := os.ReadDir(setting.RepoRootPath)
if err != nil {
assert.NoError(t, err, "unable to read the new repo root: %v\n", err)