switch to using featureEnabled for enterprise features (#41559)

* switch to using featureEnabled for enterprise features
This commit is contained in:
Dan Cech
2022-01-07 15:11:23 -05:00
committed by GitHub
parent 9eb82f9fff
commit 34f757ba5a
34 changed files with 109 additions and 148 deletions

View File

@ -894,13 +894,8 @@ func newLoader(cfg *setting.Cfg) *Loader {
}
type fakeLicensingService struct {
edition string
hasLicense bool
tokenRaw string
}
func (t *fakeLicensingService) HasLicense() bool {
return t.hasLicense
edition string
tokenRaw string
}
func (t *fakeLicensingService) Expiry() int64 {
@ -923,14 +918,18 @@ func (t *fakeLicensingService) LicenseURL(_ bool) string {
return ""
}
func (t *fakeLicensingService) HasValidLicense() bool {
return false
}
func (t *fakeLicensingService) Environment() map[string]string {
return map[string]string{"GF_ENTERPRISE_LICENSE_TEXT": t.tokenRaw}
}
func (*fakeLicensingService) EnabledFeatures() map[string]bool {
return map[string]bool{}
}
func (*fakeLicensingService) FeatureEnabled(feature string) bool {
return false
}
type fakeLogger struct {
log.Logger
}