AnonymousService: Test tagging service (#64708)

* add anonymous tagging tests

* lint
This commit is contained in:
Jo
2023-03-14 10:47:34 +01:00
committed by GitHub
parent 2f95171a45
commit aade4b0bd2
2 changed files with 183 additions and 2 deletions
+2 -2
View File
@@ -51,12 +51,12 @@ func ProvideAnonymousSessionService(remoteCache remotecache.CacheStorage, usageS
localCache: localcache.New(29*time.Minute, 15*time.Minute),
}
usageStats.RegisterMetricsFunc(a.UsageStatFn)
usageStats.RegisterMetricsFunc(a.usageStatFn)
return a
}
func (a *AnonSessionService) UsageStatFn(ctx context.Context) (map[string]interface{}, error) {
func (a *AnonSessionService) usageStatFn(ctx context.Context) (map[string]interface{}, error) {
sessionCount, err := a.remoteCache.Count(ctx, anonCachePrefix)
if err != nil {
return nil, nil