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

Method startSingleBinary

integration/util/harness.go:578–605  ·  view source on GitHub ↗

startSingleBinary starts Tempo as a single all-in-one binary and waits for it to be ready

(t *testing.T)

Source from the content-addressed store, hash-verified

576
577// startSingleBinary starts Tempo as a single all-in-one binary and waits for it to be ready
578func (h *TempoHarness) startSingleBinary(t *testing.T) error {
579 t.Helper()
580
581 readinessProbe := e2e.ReadinessProbe(e2e.NewHTTPReadinessProbe(3200, "/ready", 200, 299))
582 if h.readinessProbe != nil {
583 readinessProbe = h.readinessProbe
584 }
585
586 // Create single binary service with custom readiness probe
587 // Using port 3201 for readiness to avoid conflicts with main HTTP port
588 tempo := NewTempoAllInOne(readinessProbe)
589
590 h.Services[ServiceDistributor] = tempo
591 h.Services[ServiceQueryFrontend] = tempo
592 h.Services[ServiceQuerier] = tempo
593 h.Services[ServiceLiveStoreZoneA] = tempo
594 h.Services[ServiceLiveStoreZoneB] = tempo
595 h.Services[ServiceBlockBuilder] = tempo
596 h.Services[ServiceMetricsGenerator] = tempo
597 h.Services[ServiceBackendScheduler] = tempo
598 h.Services[ServiceBackendWorker] = tempo
599
600 if err := h.TestScenario.StartAndWaitReady(tempo); err != nil {
601 return fmt.Errorf("failed to start tempo single binary: %w", err)
602 }
603
604 return nil
605}
606
607// normalizeTestName creates a valid Docker service name from a test name
608func normalizeTestName(testName string) string {

Callers 1

runTempoHarnessFunction · 0.95

Calls 1

NewTempoAllInOneFunction · 0.85

Tested by

no test coverage detected