MCPcopy Create free account
hub / github.com/cortexproject/cortex / TestChunkIter

Function TestChunkIter

pkg/querier/batch/chunk_test.go:22–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20)
21
22func TestChunkIter(t *testing.T) {
23 t.Parallel()
24 forEncodings(t, func(t *testing.T, enc promchunk.Encoding) {
25 chunk := mkGenericChunk(t, 0, 100, enc)
26 iter := &chunkIterator{}
27
28 iter.reset(chunk)
29 testIter(t, 100, newIteratorAdapter(iter), enc)
30
31 iter.reset(chunk)
32 testSeek(t, 100, newIteratorAdapter(iter), enc)
33 })
34}
35
36func forEncodings(t *testing.T, f func(t *testing.T, enc promchunk.Encoding)) {
37 for _, enc := range []promchunk.Encoding{

Callers

nothing calls this directly

Calls 6

resetMethod · 0.95
forEncodingsFunction · 0.85
mkGenericChunkFunction · 0.85
testIterFunction · 0.85
newIteratorAdapterFunction · 0.85
testSeekFunction · 0.85

Tested by

no test coverage detected