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

Function RunIntegrationTests

integration/util/harness.go:170–194  ·  view source on GitHub ↗

RunIntegrationTests sets up Tempo for integration tests as requested through the config and then calls the provided testFunc

(t *testing.T, config TestHarnessConfig, testFunc func(*TempoHarness))

Source from the content-addressed store, hash-verified

168
169// RunIntegrationTests sets up Tempo for integration tests as requested through the config and then calls the provided testFunc
170func RunIntegrationTests(t *testing.T, config TestHarnessConfig, testFunc func(*TempoHarness)) {
171 t.Helper()
172 t.Parallel()
173
174 // defaults
175 if config.Backends == 0 {
176 config.Backends = BackendLocal
177 }
178
179 if config.DeploymentMode == 0 {
180 config.DeploymentMode = DeploymentModeMicroservices
181 }
182
183 if config.Components == 0 {
184 config.Components = ComponentsRecentDataQuerying
185 }
186
187 backendTCs := backendTestCases(config.Backends)
188
189 // Run tests for each deployment mode and backend combination
190 for _, be := range backendTCs {
191 // t.Run() with t.Parallel() here will cause some tests to run faster, but others like TestKVStores will fail for unknown reasons.
192 runTempoHarness(t, config, be.name, testFunc)
193 }
194}
195
196type backendTestCase struct {
197 mask BackendsMask

Callers 15

TestBackendSchedulerFunction · 0.92
TestPollerOwnershipFunction · 0.92
TestTenantDeletionFunction · 0.92
TestQueryRangeExemplarsFunction · 0.92
TestQueryRangeMaxSeriesFunction · 0.92
TestQueryRangeEndCutoffFunction · 0.92
TestOverridesAPI_GETFunction · 0.92

Calls 2

backendTestCasesFunction · 0.85
runTempoHarnessFunction · 0.85

Tested by 15

TestBackendSchedulerFunction · 0.74
TestPollerOwnershipFunction · 0.74
TestTenantDeletionFunction · 0.74
TestQueryRangeExemplarsFunction · 0.74
TestQueryRangeMaxSeriesFunction · 0.74
TestQueryRangeEndCutoffFunction · 0.74
TestOverridesAPI_GETFunction · 0.74