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

Function TestCacheConfigName

modules/cache/config_test.go:124–151  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

122}
123
124func TestCacheConfigName(t *testing.T) {
125 tcs := []struct {
126 cfg *CacheConfig
127 expected string
128 }{
129 {
130 cfg: &CacheConfig{
131 Role: []cache.Role{cache.RoleBloom},
132 },
133 expected: "bloom",
134 },
135 {
136 cfg: &CacheConfig{
137 Role: []cache.Role{cache.RoleBloom, cache.RoleParquetColumnIdx},
138 },
139 expected: "bloom|parquet-column-idx",
140 },
141 {
142 cfg: &CacheConfig{},
143 expected: "",
144 },
145 }
146
147 for _, tc := range tcs {
148 actual := tc.cfg.Name()
149 require.Equal(t, tc.expected, actual)
150 }
151}
152
153func TestMaxItemSize(t *testing.T) {
154 tcs := []struct {

Callers

nothing calls this directly

Calls 2

NameMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected