MCPcopy Create free account
hub / github.com/cortexproject/cortex / defaultIngesterTestConfig

Function defaultIngesterTestConfig

pkg/ingester/lifecycle_test.go:29–48  ·  view source on GitHub ↗
(t testing.TB)

Source from the content-addressed store, hash-verified

27const userID = "1"
28
29func defaultIngesterTestConfig(t testing.TB) Config {
30 t.Helper()
31
32 consul, closer := consul.NewInMemoryClient(ring.GetCodec(), log.NewNopLogger(), nil)
33 t.Cleanup(func() { assert.NoError(t, closer.Close()) })
34
35 cfg := Config{}
36 flagext.DefaultValues(&cfg)
37 flagext.DefaultValues(&cfg.BlocksStorageConfig)
38 cfg.LifecyclerConfig.RingConfig.KVStore.Mock = consul
39 cfg.LifecyclerConfig.NumTokens = 1
40 cfg.LifecyclerConfig.ListenPort = 0
41 cfg.LifecyclerConfig.Addr = "localhost"
42 cfg.LifecyclerConfig.ID = "localhost"
43 cfg.LifecyclerConfig.FinalSleep = 0
44 cfg.ActiveSeriesMetricsEnabled = true
45 cfg.LabelsStringInterningEnabled = true
46 cfg.MatchersCacheMaxItems = 1024
47 return cfg
48}
49
50func defaultClientTestConfig() client.Config {
51 clientConfig := client.Config{}

Calls 3

GetCodecFunction · 0.92
DefaultValuesFunction · 0.92
CloseMethod · 0.65

Tested by

no test coverage detected