(t *testing.T)
| 184 | } |
| 185 | |
| 186 | func TestInitLiveStoreSingleBinaryUsesLocalIngest(t *testing.T) { |
| 187 | cfg := NewDefaultConfig() |
| 188 | cfg.Target = SingleBinary |
| 189 | cfg.LiveStore.WAL.Filepath = t.TempDir() |
| 190 | cfg.LiveStore.ShutdownMarkerDir = t.TempDir() |
| 191 | cfg.LiveStore.Ring.InstanceID = "single-binary" |
| 192 | |
| 193 | partitionRingStore, partitionRingCloser := consul.NewInMemoryClient(dskitring.GetPartitionRingCodec(), log.NewNopLogger(), nil) |
| 194 | defer partitionRingCloser.Close() |
| 195 | readRingStore, readRingCloser := consul.NewInMemoryClient(dskitring.GetCodec(), log.NewNopLogger(), nil) |
| 196 | defer readRingCloser.Close() |
| 197 | cfg.LiveStore.PartitionRing.KVStore.Mock = partitionRingStore |
| 198 | cfg.LiveStore.Ring.KVStore.Mock = readRingStore |
| 199 | |
| 200 | overridesSvc, err := overrides.NewOverrides(cfg.Overrides, nil, prometheus.NewRegistry()) |
| 201 | require.NoError(t, err) |
| 202 | |
| 203 | app := &App{ |
| 204 | cfg: *cfg, |
| 205 | Server: &fakeTempoServer{router: mux.NewRouter(), grpc: grpc.NewServer()}, |
| 206 | Overrides: overridesSvc, |
| 207 | store: newTestStore(t, t.TempDir()), |
| 208 | } |
| 209 | |
| 210 | svc, err := app.initLiveStore() |
| 211 | require.NoError(t, err) |
| 212 | require.NotNil(t, svc) |
| 213 | require.NotNil(t, app.liveStore) |
| 214 | assert.False(t, app.cfg.LiveStore.ConsumeFromKafka) |
| 215 | } |
| 216 | |
| 217 | func TestSetupModuleManagerSingleBinaryUsesLocalDistributorAndGeneratorDeps(t *testing.T) { |
| 218 | cfg := NewDefaultConfig() |
nothing calls this directly
no test coverage detected