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

Function defaultInstanceAndTmpDir

modules/livestore/instance_search_test.go:584–596  ·  view source on GitHub ↗
(t testing.TB)

Source from the content-addressed store, hash-verified

582}
583
584func defaultInstanceAndTmpDir(t testing.TB) (*instance, *LiveStore) {
585 tmpDir := t.TempDir()
586
587 liveStore, err := defaultLiveStore(t, tmpDir)
588 require.NoError(t, err)
589 liveStore.cfg.QueryBlockConcurrency = 1
590
591 // Create a fake instance for testing
592 instance, err := liveStore.getOrCreateInstance(testTenantID)
593 require.NoError(t, err, "unexpected error creating new instance")
594
595 return instance, liveStore
596}
597
598func defaultConfig(t testing.TB, tmpDir string) Config {
599 cfg := Config{}

Callers 7

TestInstanceSearchFunction · 0.85
defaultInstanceFunction · 0.85

Calls 2

defaultLiveStoreFunction · 0.85
getOrCreateInstanceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…