managarten/services/mana-search/internal/handler/helpers_test.go
Till JS 7e931b1c6d refactor(services): rename Go services, remove -go suffix
mana-search-go → mana-search
mana-notify-go → mana-notify
mana-crawler-go → mana-crawler
mana-api-gateway-go → mana-api-gateway

Legacy NestJS versions are deleted, suffix no longer needed.
Updated all references in docker-compose, CLAUDE.md, package.json,
Forgejo workflows, and service package.json files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 10:18:40 +01:00

25 lines
536 B
Go

package handler
import (
"sync"
"github.com/manacore/mana-search/internal/cache"
"github.com/manacore/mana-search/internal/config"
"github.com/manacore/mana-search/internal/metrics"
)
var (
testMetrics *metrics.Metrics
testCache *cache.Cache
testConfig *config.Config
initOnce sync.Once
)
func testDeps() (*metrics.Metrics, *cache.Cache, *config.Config) {
initOnce.Do(func() {
testMetrics = metrics.New()
testCache = &cache.Cache{}
testConfig = &config.Config{}
})
return testMetrics, testCache, testConfig
}