Encryption: Add usage stats to secrets service (#42437)
* Encryption: Add usage stats to secrets service * Sort imports
This commit is contained in:
@@ -3,6 +3,7 @@ package manager
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/pkg/infra/usagestats"
|
||||
"github.com/grafana/grafana/pkg/services/encryption/ossencryption"
|
||||
"github.com/grafana/grafana/pkg/services/kmsproviders/osskmsproviders"
|
||||
"github.com/grafana/grafana/pkg/services/secrets"
|
||||
@@ -24,7 +25,6 @@ func SetupTestService(tb testing.TB, store secrets.Store) *SecretsService {
|
||||
require.NoError(tb, err)
|
||||
cfg := &setting.Cfg{Raw: raw}
|
||||
cfg.FeatureToggles = map[string]bool{secrets.EnvelopeEncryptionFeatureToggle: true}
|
||||
|
||||
settings := &setting.OSSImpl{Cfg: cfg}
|
||||
assert.True(tb, settings.IsFeatureToggleEnabled(secrets.EnvelopeEncryptionFeatureToggle))
|
||||
|
||||
@@ -34,6 +34,7 @@ func SetupTestService(tb testing.TB, store secrets.Store) *SecretsService {
|
||||
osskmsproviders.ProvideService(encryption, settings),
|
||||
encryption,
|
||||
settings,
|
||||
&usagestats.UsageStatsMock{T: tb},
|
||||
)
|
||||
require.NoError(tb, err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user