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

Function TestFormatConversion

modules/overrides/config_test.go:309–321  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

307}
308
309func TestFormatConversion(t *testing.T) {
310 legacyOverrides := generateTestLegacyOverrides()
311
312 // Verify that all fields have been populated in our test fixture
313 ensureAllFieldsPopulated(t, legacyOverrides)
314
315 // Convert to new format and back
316 newOverrides := legacyOverrides.toNewLimits()
317 convertedLegacyOverrides := newOverrides.toLegacy()
318
319 // Compare original and converted
320 assert.Equal(t, legacyOverrides, convertedLegacyOverrides)
321}
322
323// ensureAllFieldsPopulated checks that all fields in the struct have non-zero values
324// This helps catch if a new field is added to LegacyOverrides but not included in our test fixture

Callers

nothing calls this directly

Calls 5

ensureAllFieldsPopulatedFunction · 0.85
toNewLimitsMethod · 0.80
toLegacyMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected