Initial Baby Step to refactoring settings from global vars to instance (#11777)

* wip: start on refactoring settings

* settings: progress on settings refactor

* refactor: progress on settings refactoring

* fix: fixed failing test

* settings: moved smtp settings from global to instance
This commit is contained in:
Torkel Ödegaard
2018-04-30 16:21:04 +02:00
committed by GitHub
parent fc718b8a9a
commit fa7d7ed5df
28 changed files with 263 additions and 203 deletions

View File

@@ -13,7 +13,8 @@ func TestInfluxdbResponseParser(t *testing.T) {
Convey("Response parser", func() {
parser := &ResponseParser{}
setting.NewConfigContext(&setting.CommandLineArgs{
cfg := setting.NewCfg()
cfg.Load(&setting.CommandLineArgs{
HomePath: "../../../",
})

View File

@@ -10,7 +10,8 @@ import (
func TestInterval(t *testing.T) {
Convey("Default interval ", t, func() {
setting.NewConfigContext(&setting.CommandLineArgs{
cfg := setting.NewCfg()
cfg.Load(&setting.CommandLineArgs{
HomePath: "../../",
})