ServiceAccounts: Add Prometheus metrics service (#51831)

* ServiceAccounts: Add Prometheus metrics service

* add missing init in tests
This commit is contained in:
Jguer
2022-07-07 10:03:16 -04:00
committed by GitHub
parent 10cb84e401
commit db9f80a7a3
6 changed files with 74 additions and 0 deletions
@@ -16,6 +16,7 @@ func TestStore_UsageStats(t *testing.T) {
saToCreate := tests.TestUser{Login: "servicetestwithTeam@admin", IsServiceAccount: true}
db, store := setupTestDatabase(t)
sa := tests.SetupUserServiceAccount(t, db, saToCreate)
InitMetrics()
keyName := t.Name()
key, err := apikeygen.New(sa.OrgID, keyName)