(t testing.TB)
| 27 | const userID = "1" |
| 28 | |
| 29 | func 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 | |
| 50 | func defaultClientTestConfig() client.Config { |
| 51 | clientConfig := client.Config{} |
no test coverage detected