[9.2.x] Backport Contexthandler: Add uname as response header #59930 (#59950)

* Contexthandler: Add uname as response header (#59930)

Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit 1b676d0d49)

* fixes tests broken due to moved featuremgt package

Signed-off-by: bergquist <carl.bergquist@gmail.com>

Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
Carl Bergquist
2022-12-07 15:27:34 +01:00
committed by GitHub
parent 6c73fd2635
commit 95d2adf251
10 changed files with 139 additions and 1 deletions
+2
View File
@@ -220,6 +220,7 @@ func getContextHandler(t *testing.T, cfg *setting.Cfg) *contexthandler.ContextHa
func setupScenarioContext(t *testing.T, url string) *scenarioContext {
cfg := setting.NewCfg()
cfg.IsFeatureToggleEnabled = func(key string) bool { return false }
sc := &scenarioContext{
url: url,
t: t,
@@ -248,6 +249,7 @@ func (s *fakeRenderService) Init() error {
func setupAccessControlScenarioContext(t *testing.T, cfg *setting.Cfg, url string, permissions []accesscontrol.Permission) (*scenarioContext, *HTTPServer) {
cfg.Quota.Enabled = false
cfg.IsFeatureToggleEnabled = func(key string) bool { return false }
store := sqlstore.InitTestDB(t)
hs := &HTTPServer{
+1
View File
@@ -29,6 +29,7 @@ func setupOAuthTest(t *testing.T, cfg *setting.Cfg) *web.Mux {
cfg = setting.NewCfg()
}
cfg.ErrTemplateName = "error-template"
cfg.IsFeatureToggleEnabled = func(key string) bool { return false }
sqlStore := sqlstore.InitTestDB(t)