Chore: Remove apikey store methods from sqlstore (#53197)

* Chore: remove apikey store methods from sqlstore

* remove GetAPIKeys

* remove GetAllAPIKeys

* remove the rest of apikey from sqlstore
This commit is contained in:
Serge Zaitsev
2022-08-03 08:13:05 -04:00
committed by GitHub
parent 5d014f0c37
commit 8d36f71673
9 changed files with 38 additions and 502 deletions
+1 -6
View File
@@ -28,7 +28,7 @@ func TestIntegrationStatsDataAccess(t *testing.T) {
assert.Equal(t, int64(3), query.Result.Admins)
assert.Equal(t, int64(0), query.Result.LibraryPanels)
assert.Equal(t, int64(0), query.Result.LibraryVariables)
assert.Equal(t, int64(1), query.Result.APIKeys)
assert.Equal(t, int64(0), query.Result.APIKeys)
})
t.Run("Get system user count stats should not results in error", func(t *testing.T) {
@@ -127,9 +127,4 @@ func populateDB(t *testing.T, sqlStore *SQLStore) {
// force renewal of user stats
err = sqlStore.updateUserRoleCountsIfNecessary(context.Background(), true)
require.NoError(t, err)
// add 1st api key
addAPIKeyCmd := &models.AddApiKeyCommand{OrgId: org.Id, Name: "Test key 1", Key: "secret-key", Role: models.ROLE_VIEWER}
err = sqlStore.AddAPIKey(context.Background(), addAPIKeyCmd)
require.NoError(t, err)
}