Remove bus from usage stats (#45275)

This commit is contained in:
idafurjes
2022-02-11 14:04:15 +01:00
committed by GitHub
parent 0e8a5407d1
commit d8a56d08ba
11 changed files with 224 additions and 336 deletions
+4 -4
View File
@@ -19,7 +19,7 @@ func TestStatsDataAccess(t *testing.T) {
t.Run("Get system stats should not results in error", func(t *testing.T) {
query := models.GetSystemStatsQuery{}
err := GetSystemStats(context.Background(), &query)
err := sqlStore.GetSystemStats(context.Background(), &query)
require.NoError(t, err)
assert.Equal(t, int64(3), query.Result.Users)
assert.Equal(t, int64(0), query.Result.Editors)
@@ -38,19 +38,19 @@ func TestStatsDataAccess(t *testing.T) {
t.Run("Get datasource stats should not results in error", func(t *testing.T) {
query := models.GetDataSourceStatsQuery{}
err := GetDataSourceStats(context.Background(), &query)
err := sqlStore.GetDataSourceStats(context.Background(), &query)
assert.NoError(t, err)
})
t.Run("Get datasource access stats should not results in error", func(t *testing.T) {
query := models.GetDataSourceAccessStatsQuery{}
err := GetDataSourceAccessStats(context.Background(), &query)
err := sqlStore.GetDataSourceAccessStats(context.Background(), &query)
assert.NoError(t, err)
})
t.Run("Get alert notifier stats should not results in error", func(t *testing.T) {
query := models.GetAlertNotifierUsageStatsQuery{}
err := GetAlertNotifiersUsageStats(context.Background(), &query)
err := sqlStore.GetAlertNotifiersUsageStats(context.Background(), &query)
assert.NoError(t, err)
})