This commit is contained in:
wxiaoguang 2024-12-21 19:18:59 +08:00
parent f57323a807
commit 0d6c5bd9a6
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )
func TestDetectGiteaRoot(t *testing.T) { func TestSetupGiteaRoot(t *testing.T) {
t.Setenv("GITEA_ROOT", "test") t.Setenv("GITEA_ROOT", "test")
assert.Equal(t, "test", SetupGiteaRoot()) assert.Equal(t, "test", SetupGiteaRoot())
t.Setenv("GITEA_ROOT", "") t.Setenv("GITEA_ROOT", "")

View File

@ -4,7 +4,6 @@
package migrations package migrations
import ( import (
"code.gitea.io/gitea/modules/test"
"compress/gzip" "compress/gzip"
"context" "context"
"database/sql" "database/sql"
@ -26,6 +25,7 @@ import (
"code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/test"
"code.gitea.io/gitea/modules/testlogger" "code.gitea.io/gitea/modules/testlogger"
"code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"