Contexthandler: Remove code that is no longer used (#73101)

* Contexthandler: remove dead code

* Contexthandler: Add tests

* Update pkg/tests/api/alerting/api_alertmanager_test.go

Co-authored-by: Jo <joao.guerreiro@grafana.com>

---------

Co-authored-by: Jo <joao.guerreiro@grafana.com>
This commit is contained in:
Karl Persson
2023-08-09 15:17:59 +02:00
committed by GitHub
co-authored by Jo
parent 5d8e6aa162
commit e53e22ef2a
14 changed files with 205 additions and 1754 deletions
-9
View File
@@ -199,15 +199,6 @@ func CreateGrafDir(t *testing.T, opts ...GrafanaOpts) (string, string) {
_, err = serverSect.NewKey("static_root_path", publicDir)
require.NoError(t, err)
authSect, err := cfg.NewSection("auth")
require.NoError(t, err)
authBrokerState := "false"
if len(opts) > 0 && opts[0].AuthBrokerEnabled {
authBrokerState = "true"
}
_, err = authSect.NewKey("broker", authBrokerState)
require.NoError(t, err)
anonSect, err := cfg.NewSection("auth.anonymous")
require.NoError(t, err)
_, err = anonSect.NewKey("enabled", "true")