Admin: Add promotional page for Grafana Enterprise (#21422)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Emil Tullstedt
2020-01-15 14:50:44 +01:00
committed by GitHub
parent 32f055111c
commit 29687903f8
16 changed files with 493 additions and 27 deletions

View File

@@ -4,6 +4,7 @@ import (
"encoding/hex"
"errors"
"fmt"
"github.com/grafana/grafana/pkg/services/licensing"
"io/ioutil"
"net/http"
"net/http/httptest"
@@ -83,7 +84,7 @@ func TestLoginErrorCookieApiEndpoint(t *testing.T) {
sc := setupScenarioContext("/login")
hs := &HTTPServer{
Cfg: setting.NewCfg(),
License: models.OSSLicensingService{},
License: &licensing.OSSLicensingService{},
}
sc.defaultHandler = Wrap(func(w http.ResponseWriter, c *models.ReqContext) {
@@ -133,7 +134,7 @@ func TestLoginViewRedirect(t *testing.T) {
sc := setupScenarioContext("/login")
hs := &HTTPServer{
Cfg: setting.NewCfg(),
License: models.OSSLicensingService{},
License: &licensing.OSSLicensingService{},
}
hs.Cfg.CookieSecure = true
@@ -247,7 +248,7 @@ func TestLoginPostRedirect(t *testing.T) {
hs := &HTTPServer{
log: &FakeLogger{},
Cfg: setting.NewCfg(),
License: models.OSSLicensingService{},
License: &licensing.OSSLicensingService{},
AuthTokenService: auth.NewFakeUserAuthTokenService(),
}
hs.Cfg.CookieSecure = true
@@ -350,7 +351,7 @@ func TestLoginOAuthRedirect(t *testing.T) {
sc := setupScenarioContext("/login")
hs := &HTTPServer{
Cfg: setting.NewCfg(),
License: models.OSSLicensingService{},
License: &licensing.OSSLicensingService{},
}
sc.defaultHandler = Wrap(func(c *models.ReqContext) {
@@ -408,7 +409,7 @@ func setupAuthProxyLoginTest(enableLoginToken bool) *scenarioContext {
sc := setupScenarioContext("/login")
hs := &HTTPServer{
Cfg: setting.NewCfg(),
License: models.OSSLicensingService{},
License: &licensing.OSSLicensingService{},
AuthTokenService: auth.NewFakeUserAuthTokenService(),
log: log.New("hello"),
}