MCPcopy
hub / github.com/grafana/tempo / liveStoreWithConfig

Function liveStoreWithConfig

modules/livestore/instance_search_test.go:644–663  ·  view source on GitHub ↗
(t testing.TB, cfg Config)

Source from the content-addressed store, hash-verified

642}
643
644func liveStoreWithConfig(t testing.TB, cfg Config) (*LiveStore, error) {
645 // Create overrides
646 limits, err := overrides.NewOverrides(overrides.Config{}, nil, prometheus.DefaultRegisterer)
647 if err != nil {
648 return nil, err
649 }
650
651 // Create metrics
652 reg := prometheus.NewRegistry()
653
654 logger := test.NewTestingLogger(t)
655
656 // Use fake Kafka cluster for testing
657 liveStore, err := New(cfg, limits, noopCompleteBlockFlusher{}, logger, reg)
658 if err != nil {
659 return nil, err
660 }
661
662 return liveStore, services.StartAndAwaitRunning(t.Context(), liveStore)
663}
664
665func pushTracesToInstance(t *testing.T, i *instance, numTraces int) ([]*tempopb.Trace, [][]byte) {
666 var ids [][]byte

Calls 4

NewOverridesFunction · 0.92
NewTestingLoggerFunction · 0.92
NewFunction · 0.70
ContextMethod · 0.65

Tested by

no test coverage detected