MCPcopy Index your code
hub / github.com/cortexproject/cortex / TestDesc_EncodingMultikey

Function TestDesc_EncodingMultikey

pkg/ring/model_test.go:595–608  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

593}
594
595func TestDesc_EncodingMultikey(t *testing.T) {
596 codec := GetCodec()
597 ring := &Desc{Ingesters: map[string]InstanceDesc{
598 "ing1": {Addr: "addr1", Timestamp: 123456},
599 "ing2": {Addr: "addr2", Timestamp: 5678},
600 "ing3": {},
601 }}
602 encoded, err := codec.EncodeMultiKey(ring)
603 assert.NoError(t, err)
604 decoded, err := codec.DecodeMultiKey(encoded)
605 assert.NoError(t, err)
606
607 assert.Equal(t, ring, decoded)
608}
609
610func TestDesc_FindDifference(t *testing.T) {
611 tests := map[string]struct {

Callers

nothing calls this directly

Calls 4

GetCodecFunction · 0.85
EncodeMultiKeyMethod · 0.65
DecodeMultiKeyMethod · 0.65
EqualMethod · 0.65

Tested by

no test coverage detected