Chore: Remove public vars in setting package (#81018)
Removes the public variable setting.SecretKey plus some other ones. Introduces some new functions for creating setting.Cfg.
This commit is contained in:
@@ -23,12 +23,13 @@ func TestIntegrationDashboardSnapshotDBAccess(t *testing.T) {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
sqlstore := db.InitTestDB(t)
|
||||
dashStore := ProvideStore(sqlstore, setting.NewCfg())
|
||||
cfg := setting.NewCfg()
|
||||
dashStore := ProvideStore(sqlstore, cfg)
|
||||
|
||||
origSecret := setting.SecretKey
|
||||
setting.SecretKey = "dashboard_snapshot_testing"
|
||||
origSecret := cfg.SecretKey
|
||||
cfg.SecretKey = "dashboard_snapshot_testing"
|
||||
t.Cleanup(func() {
|
||||
setting.SecretKey = origSecret
|
||||
cfg.SecretKey = origSecret
|
||||
})
|
||||
secretsService := fakes.NewFakeSecretsService()
|
||||
dashboard := simplejson.NewFromAny(map[string]any{"hello": "mupp"})
|
||||
|
||||
Reference in New Issue
Block a user