mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Refactor config provider (#24245)
This PR introduces more abstract about `ConfigProvider` and hides more `ini` references. --------- Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
@@ -16,7 +16,6 @@ import (
|
||||
_ "code.gitea.io/gitea/models"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gopkg.in/ini.v1"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
@@ -27,7 +26,7 @@ func TestMain(m *testing.M) {
|
||||
|
||||
func TestBleveSearchIssues(t *testing.T) {
|
||||
assert.NoError(t, unittest.PrepareTestDatabase())
|
||||
setting.CfgProvider = ini.Empty()
|
||||
setting.CfgProvider = setting.NewEmptyConfigProvider()
|
||||
|
||||
tmpIndexerDir := t.TempDir()
|
||||
|
||||
|
@@ -18,7 +18,6 @@ import (
|
||||
_ "code.gitea.io/gitea/models"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gopkg.in/ini.v1"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
@@ -29,7 +28,7 @@ func TestMain(m *testing.M) {
|
||||
|
||||
func TestRepoStatsIndex(t *testing.T) {
|
||||
assert.NoError(t, unittest.PrepareTestDatabase())
|
||||
setting.CfgProvider = ini.Empty()
|
||||
setting.CfgProvider = setting.NewEmptyConfigProvider()
|
||||
|
||||
setting.LoadQueueSettings()
|
||||
|
||||
|
Reference in New Issue
Block a user