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

Method GetConfig

integration/util/harness.go:325–340  ·  view source on GitHub ↗

GetConfig reads and parses the Tempo configuration file that was set up by the harness. Returns the parsed app.Config or an error if reading/parsing fails.

()

Source from the content-addressed store, hash-verified

323// GetConfig reads and parses the Tempo configuration file that was set up by the harness.
324// Returns the parsed app.Config or an error if reading/parsing fails.
325func (h *TempoHarness) GetConfig() (app.Config, error) {
326 configPath := sharedContainerPath(h.TestScenario, tempoConfigFile)
327
328 buff, err := os.ReadFile(configPath)
329 if err != nil {
330 return app.Config{}, fmt.Errorf("failed to read config file: %w", err)
331 }
332
333 var cfg app.Config
334 err = yaml.UnmarshalStrict(buff, &cfg)
335 if err != nil {
336 return app.Config{}, fmt.Errorf("failed to unmarshal config: %w", err)
337 }
338
339 return cfg, nil
340}
341
342// restartServiceWithConfigOverlay stops a service, applies a config overlay, and restarts the service.
343// The overlay file is merged onto the existing config, with overlay values taking precedence.

Callers 7

waitForQueryEndCutoffMethod · 0.95
TestBackendSchedulerFunction · 0.80
TestPollerOwnershipFunction · 0.80
TestTenantDeletionFunction · 0.80
tenantOverridesMethod · 0.80

Calls 1

sharedContainerPathFunction · 0.85

Tested by 5

TestBackendSchedulerFunction · 0.64
TestPollerOwnershipFunction · 0.64
TestTenantDeletionFunction · 0.64