|
|
|
@ -152,6 +152,9 @@ func TestCollectingUsageStats(t *testing.T) { |
|
|
|
|
AuthProxyEnabled: true, |
|
|
|
|
Packaging: "deb", |
|
|
|
|
ReportingDistributor: "hosted-grafana", |
|
|
|
|
RemoteCacheOptions: &setting.RemoteCacheOptions{ |
|
|
|
|
Name: "database", |
|
|
|
|
}, |
|
|
|
|
}, sqlStore, statsService, |
|
|
|
|
withDatasources(mockDatasourceService{datasources: expectedDataSources})) |
|
|
|
|
|
|
|
|
@ -179,6 +182,7 @@ func TestCollectingUsageStats(t *testing.T) { |
|
|
|
|
assert.EqualValues(t, 11, metrics["stats.data_keys.count"]) |
|
|
|
|
assert.EqualValues(t, 3, metrics["stats.active_data_keys.count"]) |
|
|
|
|
assert.EqualValues(t, 5, metrics["stats.public_dashboards.count"]) |
|
|
|
|
assert.EqualValues(t, 1, metrics["stats.remote_cache.database.count"]) |
|
|
|
|
|
|
|
|
|
assert.InDelta(t, int64(65), metrics["stats.uptime"], 6) |
|
|
|
|
} |
|
|
|
|